15 from __future__
import print_function
16 from CoolLumiUtilities.CoolDataReader
import CoolDataReader
18 from CoolLumiUtilities.LumiBlobConversion
import unpackLiveFraction
58 self.
vetoReader = CoolDataReader(
'COOLONL_TRIGGER/COMP200',
'/TRIGGER/LUMI/PerBcidDeadtime')
76 self.
menuReader = CoolDataReader(
'COOLONL_TRIGGER/COMP200',
'/TRIGGER/LVL1/Menu')
82 trigName = obj.payload()[
'ItemName']
88 print(
"Couldn't find", trig,
"in run", run)
99 print(
'loading Trigger Counts data')
104 self.
countsReader = CoolDataReader(
'COOLONL_TRIGGER/COMP200',
'/TRIGGER/LUMI/LVL1COUNTERS')
114 for chan
in chanList:
115 if chan < 0:
continue
116 tmpList.append( chan )
134 if chan != obj.channelId():
continue
137 if obj.payload()[
'AfterPrescale'] > 0:
138 ratio =
float(obj.payload()[
'L1Accept'])/obj.payload()[
'AfterPrescale']
143 print(obj.since()>>32,
'/', obj.since()&0xFFFFFFFF, trig, ratio)
158 lb = key & 0xFFFFFFFF
159 bloblength = obj.payload()[
'HighPriority'].
size()
160 print(
'%d %d Found trigger counter blob of length %d' % (run, lb, bloblength))
173 if __name__ ==
'__main__':
176 odh.findBCIDDeadtime()