ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/AndrewGetRun.py
Revision: 1.2
Committed: Fri Dec 16 19:43:51 2011 UTC (13 years, 4 months ago) by grchrist
Content type: text/x-python
Branch: MAIN
CVS Tags: 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
Branch point for: V00-00-06
Changes since 1.1: +2 -0 lines
Log Message:
More integration: adeded extra table info. fixed bug in ref runs.


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