ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/DatabaseRateMonitor.py
Revision: 1.25
Committed: Thu Apr 5 11:01:37 2012 UTC (13 years ago) by grchrist
Content type: text/x-python
Branch: MAIN
Changes since 1.24: +10 -8 lines
Log Message:
more error modes and increased stream A threshold to 1600 Hz (for this week)

File Contents

# User Rev Content
1 amott 1.1 #!/usr/bin/env python
2    
3 amott 1.15 #from AndrewGetRun import GetRun
4 amott 1.1 from DatabaseParser import *
5     from ReadConfig import RateMonConfig
6     import sys
7     import os
8     import cPickle as pickle
9     import getopt
10     import time
11     from colors import *
12     from TablePrint import *
13     from AddTableInfo_db import MoreTableInfo
14     from math import *
15    
16     WBMPageTemplate = "http://cmswbm/cmsdb/servlet/RunSummary?RUN=%s&DB=cms_omds_lb"
17     WBMRunInfoPage = "https://cmswbm/cmsdb/runSummary/RunSummary_1.html"
18    
19     RefRunNameTemplate = "RefRuns/Run_%s.pk"
20    
21     # define a function that clears the terminal screen
22     def clear():
23     print("\x1B[2J")
24    
25    
26     def usage():
27     print sys.argv[0]+" [Options]"
28     print "This script gets the current HLT trigger rates and compares them to a reference run"
29     print "Options: "
30     print "--AllowedDiff=<diff> Report only if difference in trigger rate is greater than <diff>%"
31     print "--CompareRun=<Run #> Compare run <Run #> to the reference run (Default = Current Run)"
32     print "--FindL1Zeros Look for physics paths with 0 L1 rate"
33     print "--FirstLS=<ls> Specify the first lumisection to consider. This will set LSSlidingWindow to -1"
34     print "--NumberLS=<#> Specify the last lumisection to consider. Make sure LastLS > LSSlidingWindow"
35     print " or set LSSlidingWindow = -1"
36     print "--IgnoreLowRate=<rate> Ignore triggers with an actual and expected rate below <rate>"
37     print "--ListIgnoredPaths Prints the paths that are not compared by this script and their rate in the CompareRun"
38     print "--PrintLumi Prints Instantaneous, Delivered, and Live lumi by LS for the run"
39     print "--RefRun=<Run #> Specifies <Run #> as the reference run to use (Default in defaults.cfg)"
40     print "--ShowPSTriggers Show prescaled triggers in rate comparison"
41 amott 1.2 print "--force Override the check for collisions run"
42 amott 1.1 print "--help Print this help"
43 grchrist 1.20
44     def pickYear():
45     global thisyear
46 grchrist 1.23 thisyear="2012"
47     ##print "Year set to ",thisyear
48 grchrist 1.20
49 amott 1.1 def main():
50 grchrist 1.21 pickYear()
51 amott 1.1 try:
52     opt, args = getopt.getopt(sys.argv[1:],"",["AllowedDiff=","CompareRun=","FindL1Zeros",\
53     "FirstLS=","NumberLS=","IgnoreLowRate=","ListIgnoredPaths",\
54 amott 1.2 "PrintLumi","RefRun=","ShowPSTriggers","force","help"])
55 amott 1.1 except getopt.GetoptError, err:
56     print str(err)
57     usage()
58     sys.exit(2)
59    
60     Config = RateMonConfig(os.path.abspath(os.path.dirname(sys.argv[0])))
61     for o,a in opt:
62     if o=="--ConfigFile":
63     Config.CFGfile=a
64     Config.ReadCFG()
65 grchrist 1.12
66 grchrist 1.23
67    
68 amott 1.1 AllowedRateDiff = Config.DefAllowRateDiff
69     CompareRunNum = ""
70     FindL1Zeros = False
71     FirstLS = 9999
72 amott 1.2 NumLS = -10
73 amott 1.1 IgnoreThreshold = Config.DefAllowIgnoreThresh
74     ListIgnoredPaths = False
75     PrintLumi = False
76     RefRunNum = int(Config.ReferenceRun)
77     ShowPSTriggers = True
78 amott 1.2 Force = False
79 amott 1.1
80 grchrist 1.23
81     ## if int(Config.ShifterMode):
82     ## print "ShifterMode!!"
83     ## else:
84     ## print "ExpertMode"
85 amott 1.1
86     if Config.LSWindow > 0:
87     NumLS = -1*Config.LSWindow
88    
89     for o,a in opt: # get options passed on the command line
90     if o=="--AllowedDiff":
91     AllowedRateDiff = float(a)/100.0
92     elif o=="--CompareRun":
93     CompareRunNum=int(a)
94     elif o=="--FindL1Zeros":
95     FindL1Zeros = True
96     elif o=="--FirstLS":
97     FirstLS = int(a)
98     elif o=="--NumberLS":
99     NumLS = int(a)
100     elif o=="--IgnoreLowRate":
101     IgnoreThreshold = float(a)
102     elif o=="--ListIgnoredPaths":
103     ListIgnoredPaths=True
104     elif o=="--PrintLumi":
105     PrintLumi = True
106     elif o=="--RefRun":
107     RefRunNum=int(a)
108     elif o=="--ShowPSTriggers":
109     ShowPSTriggers=True
110 amott 1.2 elif o=="--force":
111     Force = True
112 amott 1.1 elif o=="--help":
113     usage()
114     sys.exit(0)
115     else:
116     print "Invalid Option "+a
117     sys.exit(1)
118    
119 grchrist 1.23
120 amott 1.1 RefLumisExists = False
121    
122     """
123     if RefRunNum > 0:
124     RefRates = {}
125     for Iterator in range(1,100):
126     if RefLumisExists: ## Quits at the end of a run
127     if max(RefLumis[0]) <= (Iterator+1)*10:
128     break
129    
130     RefRunFile = RefRunNameTemplate % str( RefRunNum*100 + Iterator ) # place to save the reference run info
131     print "RefRunFile=",RefRunFile
132     if not os.path.exists(RefRunFile[:RefRunFile.rfind('/')]): # folder for ref run file must exist
133     print "Reference run folder does not exist, please create" # should probably create programmatically, but for now force user to create
134     print RefRunFile[:RefRunFile.rfind('/')]
135     sys.exit(0)
136    
137     if not os.path.exists(RefRunFile): # if the reference run is not saved, get it from wbm
138     print "Reference Run File for run "+str(RefRunNum)+" iterator "+str(Iterator)+" does not exist"
139     print "Creating ..."
140     try:
141     RefParser = GetRun(RefRunNum, RefRunFile, True, Iterator*10, (Iterator+1)*10)
142     print "parsing"
143     except:
144     print "GetRun failed from LS "+str(Iterator*10)+" to "+str((Iterator+1)*10)
145     continue
146    
147     else: # otherwise load it from the file
148     RefParser = pickle.load( open( RefRunFile ) )
149     print "loading"
150     if not RefLumisExists:
151     RefLumis = RefParser.LumiInfo
152     RefLumisExists = True
153    
154     try:
155     RefRates[Iterator] = RefParser.TriggerRates # get the trigger rates from the reference run
156     LastSuccessfulIterator = Iterator
157     except:
158     print "Failed to get rates from LS "+str(Iterator*10)+" to "+str((Iterator+1)*10)
159     """
160    
161     RefRunFile = RefRunNameTemplate % RefRunNum
162     RefParser = DatabaseParser()
163 grchrist 1.23 ##print "Reference Run: "+str(RefRunNum)
164 amott 1.1 if RefRunNum > 0:
165     if not os.path.exists(RefRunFile[:RefRunFile.rfind('/')]): # folder for ref run file must exist
166     print "Reference run folder does not exist, please create" # should probably create programmatically, but for now force user to create
167     print RefRunFile[:RefRunFile.rfind('/')]
168     sys.exit(0)
169     return
170     if not os.path.exists(RefRunFile):
171     # create the reference run file
172     try:
173     RefParser.RunNumber = RefRunNum
174     RefParser.ParseRunSetup()
175     #RefParser.GetAllTriggerRatesByLS()
176     #RefParser.Save( RefRunFile )
177     except e:
178     print "PROBLEM GETTING REFERNCE RUN"
179     raise
180     else:
181     RefParser = pickle.load( open( RefRunFile ) )
182    
183     # OK, Got the Reference Run
184     # Now get the most recent run
185    
186     SaveRun = False
187     if CompareRunNum=="": # if no run # specified on the CL, get the most recent run
188 grchrist 1.22 CompareRunNum,isCol,isGood = GetLatestRunNumber()
189     if not isGood:
190 grchrist 1.23 print "NO TRIGGER KEY FOUND for run ",CompareRunNum
191 grchrist 1.22
192 grchrist 1.23 ##sys.exit(0)
193 amott 1.1
194     if not isCol:
195     print "Most Recent run, "+str(CompareRunNum)+", is NOT collisions"
196 amott 1.16 print "Monitoring only stream A and Express"
197     #if not Force:
198     # sys.exit(0) # maybe we should walk back and try to find a collisions run, but for now just exit
199 grchrist 1.23
200     else:
201     print "Most Recent run is "+str(CompareRunNum)
202 amott 1.16 else:
203 grchrist 1.22 CompareRunNum,isCol,isGood = GetLatestRunNumber(CompareRunNum)
204     if not isGood:
205 grchrist 1.23 print "NO TRIGGER KEY FOUND for run ", CompareRunNum
206     ##sys.exit(0)
207 amott 1.17
208 grchrist 1.23
209 amott 1.17 HeadParser = DatabaseParser()
210     HeadParser.RunNumber = CompareRunNum
211 grchrist 1.23
212     try:
213     HeadParser.ParseRunSetup()
214     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,isCol)
215     LastGoodLS=HeadParser.GetLastLS(isCol)
216     CurrRun=CompareRunNum
217     except:
218     HeadLumiRange=[]
219     LastGoodLS=-1
220     CurrRun=CompareRunNum
221     isGood=0
222    
223     if len(HeadLumiRange) is 0:
224     print "No lumisections that are taking physics data"
225     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,False)
226     if len(HeadLumiRange)>0:
227     isGood=1
228     isCol=0
229     ##sys.exit(0)
230    
231    
232 amott 1.1 if PrintLumi:
233     for LS in HeadParser.LumiInfo[0]:
234     try:
235     if (LS < FirstLS or LS > LastLS) and not FirstLS==999999:
236     continue
237     print str(LS)+' '+str(round(HeadParser.LumiInfo[2][LS],1))+' '+str(round((HeadParser.LumiInfo[3][LS] - HeadParser.LumiInfo[3][LS-1])*1000/23.3,0))+' '+str(round((HeadParser.LumiInfo[4][LS] - HeadParser.LumiInfo[4][LS-1])*1000/23.3,0))
238     except:
239     print "Lumisection "+str(LS-1)+" was not parsed from the LumiSections page"
240    
241 grchrist 1.23 sys.exit(0)
242 amott 1.1
243     if RefRunNum == 0:
244     RefRates = 0
245     RefLumis = 0
246     LastSuccessfulIterator = 0
247    
248     ### Now actually compare the rates, make tables and look at L1. Loops for ShifterMode
249     #CheckTriggerList(HeadParser,RefRunNum,RefRates,RefLumis,LastSuccessfulIterator,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config)
250 grchrist 1.23
251     ###isGood=1##if there is a trigger key
252 amott 1.1 try:
253     while True:
254 grchrist 1.23
255     if isGood:
256     LastGoodLS=HeadParser.GetLastLS(isCol)
257     if not isCol:
258     ##clear()
259    
260     MoreTableInfo(HeadParser,HeadLumiRange,Config,False)
261     else:
262 grchrist 1.25 if (len(HeadLumiRange)>0):
263     RunComparison(HeadParser,RefParser,HeadLumiRange,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config,ListIgnoredPaths)
264     if FindL1Zeros:
265     CheckL1Zeros(HeadParser,RefRunNum,RefRates,RefLumis,LastSuccessfulIterator,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config)
266     else:
267     "No lumis with physics data"
268 grchrist 1.23 if int(Config.ShifterMode):
269     #print "Shifter Mode. Continuing"
270     pass
271 amott 1.2 else:
272 grchrist 1.23 print "Expert Mode. Quitting."
273     sys.exit(0)
274 amott 1.2
275 amott 1.1
276     print "Sleeping for 1 minute before repeating "
277 amott 1.16 for iSleep in range(20):
278 amott 1.15 write(".")
279     sys.stdout.flush()
280 amott 1.16 time.sleep(3)
281 grchrist 1.23 write(" Updating\n")
282 amott 1.15 sys.stdout.flush()
283 grchrist 1.23
284     ##print "\nminLS=",min(HeadLumiRange),"Last LS=",HeadParser.GetLastLS(isCol),"run=",HeadParser.RunNumber
285     ###Get a new run if DAQ stops
286     ##print "\nLastGoodLS=",LastGoodLS
287    
288     ##### NEED PLACEHOLDER TO COMPARE CURRENT RUN TO LATEST RUN #####
289    
290     NewRun,isCol,isGood = GetLatestRunNumber(9999999) ## update to the latest run and lumi range
291    
292     try:
293     maxLumi=max(HeadLumiRange)
294     except:
295     maxLumi=0
296    
297     ##### THESE ARE CONDITIONS TO GET NEW RUN #####
298     if maxLumi>(LastGoodLS+1) or not isGood or NewRun!=CurrRun:
299     print "Trying to get new Run"
300     try:
301     HeadParser = DatabaseParser()
302     HeadParser.RunNumber = NewRun
303     HeadParser.ParseRunSetup()
304     CurrRun,isCol,isGood=GetLatestRunNumber(9999999)
305     FirstLS=9999
306     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,isCol)
307     if len(HeadLumiRange) is 0:
308     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,False)
309     if len(HeadLumiRange)>0:
310     isGood=1
311     isCol=0
312    
313     LastGoodLS=HeadParser.GetLastLS(isCol)
314 grchrist 1.25 ##print CurrRun, isCol, isGood
315 grchrist 1.23 except:
316     isGood=0
317     isCol=0
318     print "failed"
319    
320    
321    
322    
323     ##CurrRun,isCol,isGood = GetLatestRunNumber(CurrRun) ## update to the latest run and lumi range
324     else:
325     try:
326     HeadParser.ParseRunSetup()
327     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,isCol)
328     if len(HeadLumiRange) is 0:
329     HeadLumiRange = HeadParser.GetLSRange(FirstLS,NumLS,False)
330     if len(HeadLumiRange)>0:
331     isGood=1
332     isCol=0
333     LastGoodLS=HeadParser.GetLastLS(isCol)
334    
335     except:
336     isGood=0
337     isCol=0
338     clear()
339     print "NO TRIGGER KEY FOUND YET for run", NewRun ,"repeating search"
340    
341    
342     ## try:
343     ## HeadParser.GetLumiInfo()
344     ## if len(HeadParser.Active)>0:
345     ## isGood=1
346     ## ##print "setting to good"
347     ## except:
348     ## pass
349 grchrist 1.22
350 grchrist 1.23
351 amott 1.1 #end while True
352     #end try
353     except KeyboardInterrupt:
354     print "Quitting. Peace Out."
355    
356    
357 grchrist 1.12 def RunComparison(HeadParser,RefParser,HeadLumiRange,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config,ListIgnoredPaths):
358 amott 1.1
359     Header = ["Trigger Name","Actual","Expected","% Inc","Cur PS","Comments"]
360     Data = []
361     Warn = []
362     IgnoredRates=[]
363 grchrist 1.23
364 abrinke1 1.9 [HeadAvInstLumi,HeadAvLiveLumi,HeadAvDeliveredLumi,HeadAvDeadTime,HeadPSCols] = HeadParser.GetAvLumiInfo(HeadLumiRange)
365 abrinke1 1.3 ##[HeadUnprescaledRates, HeadTotalPrescales, HeadL1Prescales, HeadTriggerRates] = HeadParser.UpdateRun(HeadLumiRange)
366     HeadUnprescaledRates = HeadParser.UpdateRun(HeadLumiRange)
367 abrinke1 1.9 [PSColumnByLS,InstLumiByLS,DeliveredLumiByLS,LiveLumiByLS,DeadTimeByLS,PhysicsByLS,ActiveByLS] = HeadParser.LumiInfo
368    
369 grchrist 1.18 try:
370     pkl_file = open(Config.FitFileName, 'rb')
371     FitInput = pickle.load(pkl_file)
372     pkl_file.close()
373     except:
374 grchrist 1.20 "No fit file specified"
375     sys.exit(2)
376    
377 grchrist 1.23 try:
378     refrunfile="RefRuns/%s/Rates_HLT_10LS_JPAP.pkl" % (thisyear)
379     pkl_file = open(refrunfile, 'rb')
380     RefRatesInput = pickle.load(pkl_file)
381     pkl_file.close()
382     except:
383 grchrist 1.24 RefRatesInput={}
384 amott 1.1
385 abrinke1 1.3 for HeadName in HeadUnprescaledRates:
386 amott 1.1 ## SKIP triggers in the skip list
387 abrinke1 1.3 ## if not HeadTotalPrescales.has_key(HeadName): ## for whatever reason we have no prescale here, so skip (calibration paths)
388     ## continue
389     ## if not HeadTotalPrescales[HeadName]: ## prescale is thought to be 0
390     ## continue
391 grchrist 1.12
392     ## unless we are Listing Ignored paths only look at triggers in the .list file specifed in defaults.cfg
393 grchrist 1.19
394     #if StripVersion(HeadName) not in Config.MonitorList and not ListIgnoredPaths:
395 grchrist 1.24
396     #print "MonitorList=",Config.MonitorList
397     #print HeadName
398 grchrist 1.19 if HeadName not in Config.MonitorList and not ListIgnoredPaths:
399 grchrist 1.12 continue
400 grchrist 1.24
401 grchrist 1.25 ##masked_triggers = ["AlCa_", "DST_", "HLT_L1", "HLT_L2", "HLT_Zero"]
402     masked_triggers = ["AlCa_", "DST_", "HLT_L2", "HLT_Zero"]
403 abrinke1 1.9 masked_trig = False
404     for mask in masked_triggers:
405     if str(mask) in HeadName:
406     masked_trig = True
407     if masked_trig:
408     continue
409    
410 amott 1.1 skipTrig=False
411 abrinke1 1.3 TriggerRate = round(HeadUnprescaledRates[HeadName][2],2)
412 grchrist 1.24 ##print "RefRatesInput=",RefRatesInput
413 amott 1.1 if RefParser.RunNumber == 0: ## Use rate prediction functions
414    
415 abrinke1 1.9 ##PSCorrectedExpectedRate = Config.GetExpectedRate(StripVersion(HeadName),HeadAvInstLumi)
416 grchrist 1.19 PSCorrectedExpectedRate = Config.GetExpectedRate(HeadName,FitInput,RefRatesInput,HeadAvLiveLumi,HeadAvDeliveredLumi)
417 grchrist 1.25 print "expected rate=",PSCorrectedExpectedRate
418 abrinke1 1.9
419     if PSCorrectedExpectedRate[0] < 0: ##This means we don't have a prediction for this trigger
420 amott 1.1 continue
421 abrinke1 1.3 ## if not HeadTotalPrescales[HeadName]:
422     ## print HeadName+ " has total prescale 0"
423     ## continue
424 abrinke1 1.9 ExpectedRate = round((PSCorrectedExpectedRate[0] / HeadUnprescaledRates[HeadName][1]),2)
425 amott 1.1 PerDiff=0
426     if ExpectedRate>0:
427     PerDiff = int(round( (TriggerRate-ExpectedRate)/ExpectedRate,2 )*100)
428 grchrist 1.13 if abs(PerDiff) > max(AllowedRateDiff/max(sqrt(TriggerRate),sqrt(ExpectedRate)),AllowedRateDiff/2.0):
429 abrinke1 1.9 Warn.append(True)
430     else:
431     Warn.append(False)
432 amott 1.1 else:
433     Warn.append(False)
434    
435     if TriggerRate < IgnoreThreshold and ExpectedRate < IgnoreThreshold:
436     continue
437    
438     VC = ""
439    
440 abrinke1 1.3 Data.append([HeadName,TriggerRate,ExpectedRate,PerDiff,round(HeadUnprescaledRates[HeadName][1],1),VC])
441 amott 1.1
442     else: ## Use a reference run
443     ## cheap trick to only get triggers in list when in shifter mode
444     #print "shifter mode=",int(Config.ShifterMode)
445 grchrist 1.24 print "REfRun!!!"
446 amott 1.1 if int(Config.ShifterMode)==1:
447     if not HeadParser.AvgL1Prescales[HeadParser.HLTSeed[HeadName]]==1:
448     continue
449    
450     RefInstLumi = 0
451     RefIterator = 0
452    
453     RefStartIndex = ClosestIndex(HeadAvInstLumi,RefParser.GetAvLumiPerRange())
454     RefLen = -10
455    
456 abrinke1 1.3 ##[RefUnprescaledRates, RefTotalPrescales, RefL1Prescales, RefTriggerRates] = RefParser.UpdateRun(RefParser.GetLSRange(RefStartIndex,RefLen))
457     RefUnprescaledRates = RefParser.UpdateRun(RefParser.GetLSRange(RefStartIndex,RefLen))
458 amott 1.1 [RefAvInstLumi,RefAvLiveLumi,RefAvDeliveredLumi,RefAvDeadTime,RefPSCols] = RefParser.GetAvLumiInfo(RefParser.GetLSRange(RefStartIndex,RefLen))
459     RefRate = -1
460     for k,v in RefUnprescaledRates.iteritems():
461 grchrist 1.19 #if StripVersion(HeadName) == StripVersion(k): # versions may not match
462     RefRate = v
463 amott 1.1
464 abrinke1 1.3 ScaledRefRate = round( RefRate*HeadAvLiveLumi/RefAvLiveLumi/(HeadUnprescaledRates[HeadName][1]), 2 )
465 amott 1.1
466     if ScaledRefRate == 0:
467     PerDiff = 100
468     else:
469     PerDiff = int( round( (TriggerRate - ScaledRefRate)/ScaledRefRate , 2)*100)
470    
471     if TriggerRate < IgnoreThreshold and ScaledRefRate < IgnoreThreshold:
472     continue
473    
474     if abs(PerDiff) > AllowedRateDiff:
475     Warn.append(True)
476     else:
477     Warn.append(False)
478     VC = ""
479 amott 1.15 Data.append([HeadName,TriggerRate,ScaledRefRate,PerDiff,round((HeadUnprescaledRates[HeadName][1]),1),VC])
480 amott 1.1
481 grchrist 1.18
482 amott 1.1 PrettyPrintTable(Header,Data,[80,10,10,10,10,20],Warn)
483    
484 amott 1.4 MoreTableInfo(HeadParser,HeadLumiRange,Config)
485 amott 1.1
486     def CheckTriggerList(HeadParser,RefRunNum,RefRates,RefLumis,LastSuccessfulIterator,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config):
487     print "checking trigger list"
488    
489     def CheckL1Zeros(HeadParser,RefRunNum,RefRates,RefLumis,LastSuccessfulIterator,ShowPSTriggers,AllowedRateDiff,IgnoreThreshold,Config):
490     L1Zeros=[]
491     IgnoreBits = ["L1_PreCollisions","L1_InterBunch_Bsc","L1_BeamHalo","L1_BeamGas_Hf"]
492     for key in HeadParser.TriggerRates:
493     ## Skip events in the skip list
494     skipTrig=False
495     ##for trig in Config.ExcludeList:
496     ##if not trigN.find(trig) == -1:
497     ##skipTrig=True
498     ##break
499     if skipTrig:
500     continue
501     ## if no events pass the L1, add it to the L1Zeros list if not already there
502     if HeadParser.TriggerRates[key][1]==0 and not HeadParser.TriggerRates[key][4] in L1Zeros:
503     if HeadParser.TriggerRates[key][4].find('L1_BeamHalo')==-1 and HeadParser.TriggerRates[key][4].find('L1_PreCollisions')==-1 and HeadParser.TriggerRates[key][4].find('L1_InterBunch_Bsc')==-1:
504    
505     L1Zeros.append(HeadParser.TriggerRates[key][4])
506     print "L1Zeros=", L1Zeros
507    
508     if len(L1Zeros) == 0:
509     #print "It looks like no masked L1 bits seed trigger paths"
510     pass
511     else:
512     print "The following seeds are used to seed HLT bits but accept 0 events:"
513     #print "The average lumi of this run is: "+str(round(HeadParser.LumiInfo[6],1))+"e30"
514     for Seed in L1Zeros:
515     print Seed
516    
517     if __name__=='__main__':
518 grchrist 1.20 global thisyear
519 amott 1.1 main()