ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonHeavyIon/GetRun.py
Revision: 1.2
Committed: Tue Nov 8 13:59:09 2011 UTC (13 years, 5 months ago) by grchrist
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -0 lines
Error occurred while calculating annotation data.
Log Message:
Now if problem parsing lumi page returns default "junk" values rather than terminating script. Also in the expected rate calculation if div /0 error no longer terminates script but prints an error. Updated the heavy ion triggers in the monitor list and returned to removing the version label when comparing names of triggers as they are in the 2011 HI menu.

File Contents

# Content
1 #!/usr/bin/env python
2
3 import sys
4 from Page1Parser import Page1Parser
5
6 WBMPageTemplate = "http://cmswbm/cmsdb/servlet/RunSummary?RUN=%s&DB=cms_omds_lb"
7
8 def GetRun(RunNum, fileName, Save, StartLS=999999, EndEndLS=111111):
9 print "Getting info for run "+str(RunNum)
10 print "This can take several minutes ..."
11
12 RunSumPage = WBMPageTemplate % str(RunNum)
13
14 Parser = Page1Parser()
15 Parser._Parse(RunSumPage)
16 [HLTLink,LumiLink,L1Link] = Parser.ParseRunPage()
17
18 Parser._Parse(LumiLink)
19
20 Parser.ParseLumiPage(StartLS, EndEndLS)
21
22 if Parser.FirstLS==-1:
23 return Parser
24
25 HLTLink = HLTLink.replace("HLTSummary?","HLTSummary?fromLS="+str(Parser.FirstLS)+"&toLS="+str(Parser.LastLS)+"&")
26
27
28 Parser._Parse(HLTLink)
29 Parser.ParseRunSummaryPage()
30
31 Parser._Parse(L1Link)
32 Parser.ParseL1Page()
33 if Save:
34 Parser.Save(fileName)
35 print "Done!"
36
37 return Parser