ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/AndrewGetRun.py
Revision: 1.3
Committed: Wed Oct 31 16:21:22 2012 UTC (12 years, 6 months ago) by awoodard
Content type: text/x-python
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
State: FILE REMOVED
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/usr/bin/env python
2
3 import sys
4 from AndrewWBMParser import AndrewWBMParser
5
6 WBMPageTemplate = "http://cmswbm/cmsdb/servlet/RunSummary?RUN=%s&DB=cms_omds_lb"
7
8 def GetRun(RunNum, fileName, Save, StartLS=999999, EndLS=111111):
9 print "Getting info for run "+str(RunNum)+" from LS "+str(StartLS)+" to "+str(EndLS)
10 print "This can take several minutes ..."
11
12 RunSumPage = WBMPageTemplate % str(RunNum)
13
14
15 Parser = AndrewWBMParser()
16 Parser._Parse(RunSumPage)
17 [HLTLink,LumiLink,L1Link,PrescaleLink,TriggerLink] = Parser.ParseRunPage()
18
19 Parser._Parse(LumiLink)
20 [LumiInfo,StartLS,EndLS] = Parser.ParseLumiPage(StartLS,EndLS)
21
22 Parser._Parse(TriggerLink)
23 TriggerInfo = Parser.ParseTriggerModePage()
24
25 HLTLink = HLTLink.replace("HLTSummary?","HLTSummary?fromLS="+str(StartLS)+"&toLS="+str(EndLS)+"&")
26 Parser._Parse(HLTLink)
27 TriggerRates = Parser.ParseHLTSummaryPage(StartLS,EndLS)
28
29
30 Parser._Parse(L1Link)
31 L1Rates = Parser.ParseL1Page()
32
33 PrescaleValues = Parser.AssemblePrescaleValues()
34
35 TotalPSInfo = Parser.ComputeTotalPrescales(StartLS,EndLS)
36
37 CorrectedPSInfo = Parser.CorrectForPrescaleChange(StartLS,EndLS)
38
39 ## L1_LS_Link = L1Link.replace("L1Summary?","L1Summary?fromLS="+str(Parser.FirstLS)+"&toLS="+str(EndLS)+"&")
40 ## Parser._Parse(L1_LS_Link)
41 ## Parser.Parse_LS_L1Page()
42
43 if Save:
44 Parser.Save(fileName)
45 print "Done!"
46
47 return Parser