23 |
|
PSColsToIgnore.append(int(c)) |
24 |
|
except: |
25 |
|
print "ERROR: %s is not a valid prescale column" % c |
26 |
< |
|
26 |
> |
GetPrescaleTable(HLT_Key,GT_Key,GTRS_Key,PSColsToIgnore,True) |
27 |
> |
|
28 |
> |
def GetPrescaleTable(HLT_Key,GT_Key,GTRS_Key,PSColsToIgnore,doPrint): |
29 |
|
curs = ConnectDB('hlt') |
30 |
|
|
31 |
|
## Get the HLT seeds |
76 |
|
|
77 |
|
FullPrescales = {} |
78 |
|
formatString = "%60s%30s%50s%50s%50s" |
79 |
< |
print "List of triggers with non-sequential prescales:" |
80 |
< |
print formatString % ("HLT Name","L1 Name","Total","HLT","L1",) |
79 |
> |
if doPrint: |
80 |
> |
print "List of triggers with non-sequential prescales:" |
81 |
> |
print formatString % ("HLT Name","L1 Name","Total","HLT","L1",) |
82 |
|
for HLTName,L1Seeds in HLTSeed.iteritems(): |
83 |
|
if HLTName.startswith('AlCa'): ## the results don't make sense for AlCa paths |
84 |
|
continue |
110 |
|
for hlt,l1 in zip(thisHLTPS,thisL1PS): |
111 |
|
prescales.append(hlt*l1) |
112 |
|
#print HLTName+" HLT: "+str(thisHLTPS)+" L1: "+str(thisL1PS)+" Total: "+str(prescales) |
113 |
< |
if not isSequential(prescales,PSColsToIgnore): |
113 |
> |
if not isSequential(prescales,PSColsToIgnore) and doPrint: |
114 |
|
print formatString % (HLTName,L1Seeds,prescales,thisHLTPS,thisL1PS,) |
115 |
|
FullPrescales[HLTName] = prescales |
116 |
+ |
return FullPrescales |
117 |
|
|
118 |
|
def GetHLTPrescaleMatrix(cursor,HLT_Key): |
119 |
|
## Get the config ID |