ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/RateMonShiftTool_dev/CheckPrescales.py
(Generate patch)

Comparing UserCode/RateMonShiftTool_dev/CheckPrescales.py (file contents):
Revision 1.2 by amott, Thu Mar 22 18:02:11 2012 UTC vs.
Revision 1.3 by amott, Sat Mar 24 21:24:55 2012 UTC

# Line 23 | Line 23 | def main():
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
# Line 74 | Line 76 | def main():
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
# Line 107 | Line 110 | def main():
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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines