ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/GetRun.py
Revision: 1.1
Committed: Tue Nov 1 16:28:06 2011 UTC (13 years, 5 months ago) by grchrist
Content type: text/x-python
Branch: MAIN
CVS Tags: V00-02-06, V00-02-05, V00-02-04, V00-02-03, V00-02-01, V00-01-10, V-00-01-10, V00-01-09, V00-01-08, V00-01-07, V00-01-06, V00-01-05, V00-01-04, V00-01-03, V00-01-02, V00-01-01, V00-00-34, V00-00-33, MenuAnalyzer_V00-00-02, MenuAnalyzer_V00-00-01, MenuAnalyzer_V1, V00-00-32, V00-00-31, V00-00-30, V00-00-29, V00-00-28, V00-00-27, V00-00-26, V00-00-24, V00-00-23, V00-00-22, V00-00-21, V00-00-20, V00-00-19, V00-00-18, V00-00-17, V00-00-16, V00-00-15, V00-00-14, V00-00-13, V00-00-12, V00-00-11, V00-00-10, V00-00-09, V00-00-08, V00-00-07, V00-00-05, V00-00-04, V00-00-03, V00-00-02, V00-00-01, HEAD
Branch point for: V00-00-06
Log Message:
development code for rate monitoring script

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 Parser.ParseLumiPage(StartLS, EndEndLS)
20
21 if Parser.FirstLS==-1:
22 return Parser
23
24 HLTLink = HLTLink.replace("HLTSummary?","HLTSummary?fromLS="+str(Parser.FirstLS)+"&toLS="+str(Parser.LastLS)+"&")
25
26 Parser._Parse(HLTLink)
27 Parser.ParseRunSummaryPage()
28
29
30 Parser._Parse(L1Link)
31 Parser.ParseL1Page()
32
33 L1_LS_Link = L1Link.replace("L1Summary?","L1Summary?fromLS="+str(Parser.FirstLS)+"&toLS="+str(EndEndLS)+"&")
34 Parser._Parse(L1_LS_Link)
35 Parser.Parse_LS_L1Page()
36
37 if Save:
38 Parser.Save(fileName)
39 print "Done!"
40
41 return Parser