2 from Page1Parser
import Page1Parser
5 import cPickle
as pickle
7 from TablePrint
import *
9 WBMPageTemplate =
"http://cmswbm/cmsdb/servlet/TriggerMode?KEY=l1_hlt_collisions/v%s"
12 print "%s [Options] KeyVersion" % sys.argv[0]
13 print "--IgnoreCols=<cols> List of columns to ignore from the prescale checker (format is 1,2,3,4 etc.)"
18 opt, args = getopt.getopt(sys.argv[1:],
"",[
"IgnoreCols="])
19 except getopt.GetoptError
as err:
30 if o ==
"--IgnoreCols":
34 IgnoreCols.append(int(e))
36 print "Invalid argument to '--IgnoreCols' "
39 print "Invalid option "+o
43 WBMPage = WBMPageTemplate % args[0]
46 Parser._Parse(WBMPage)
47 Parser.ParseTrigModePage()
48 Parser.ComputeTotalPrescales()
50 Header=[
"Path Name",
"L1 Seed"]+Parser.ColumnLumi
51 ColWidths=[70,30]+[10]*len(Parser.ColumnLumi)
53 TOTAL L1*HLT PRESCALE TABLE:
58 Weird Looking L1*HLT Prescales
60 WARNING: paths seeded by the OR of several L1 bits may not be calculated properly (they assume an L1 prescale of 1 in all columns)
68 for line
in PrescaleTable:
73 for lumi,ps
in zip(ColLumi,prescales):
75 ratios.append(lumi/ps)
78 RatioTable.append([name,l1]+ratios)
84 for entry,i
in zip(array[0:],range(len(array[0:]))):
87 if lastEntry<entry
and lastEntry!=0:
96 for line
in PrescaleTable:
99 anomalies.append(line)
101 if __name__==
'__main__':
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)