145 """Runs the dumping routines"""
151 print(
"Opening", bsfile)
153 input = eformat.istream(bsfile)
157 code.interact(local=locals())
162 offset = args.skip
if args.skip
else 0
170 if args.events
is not None and event_count>args.events:
173 print(
"======================= RunNumber : %d , Event: %d, LB: %d, LVL1_ID: %d, Global_ID: %d bunch-x: %d TT: x%x =========================="
174 % ( event.run_no(), event_count, event.lumi_block(), event.lvl1_id(), event.global_id(), event.bc_id(), event.lvl1_trigger_type()))
177 if args.decodeItems
and args.smk==0:
178 hltrob = [f
for f
in event.children()
if f.source_id().subdetector_id()
in [eformat.helper.SubDetector.TDAQ_LVL2,eformat.helper.SubDetector.TDAQ_EVENT_FILTER] ]
180 print(
"ERROR: Cannot find HLT result. Will not decode trigger item names.")
181 args.decodeItems =
False
184 smk = res.getConfigSuperMasterKey()
186 print(
"ERROR: No SMK stored in HLT result. Will not decode trigger item names.")
187 args.decodeItems =
False
200 print(
"L2 TriggerInfo: ", [
"0x%x"%i
for i
in event.lvl2_trigger_info() ])
203 if args.l2res
or args.sizeSummary:
205 for f
in event.children():
206 if f.source_id().subdetector_id() == eformat.helper.SubDetector.TDAQ_LVL2:
207 print(
'.. %s %s %s bytes' % (f.__class__.__name__, f.source_id(), f.fragment_size_word()*4))
216 print(
".. EOF HLTResult for L2")
218 print(
".. No HLTResult for L2")
222 print(
"EF TriggerInfo: ", [
"0x%x"%i
for i
in event.event_filter_info()])
226 if args.efres
or args.sizeSummary:
228 for f
in event.children():
229 if f.source_id().subdetector_id() == eformat.helper.SubDetector.TDAQ_EVENT_FILTER:
230 print(
'.. %s %s %s bytes' % (f.__class__.__name__, f.source_id(), f.fragment_size_word()*4))
240 except Exception
as ex:
241 print(
'... **** problems in analyzing payload', ex)
242 print(
'... **** raw data[:10]',
list(f.rod_data())[:10])
243 print(
".. EOF HLTResult for EF")
245 print(
".. No HLTResult for EF")
248 print(
"StreamTag: ", [(s.name, s.type)
for s
in event.stream_tag()])
250 event_count =
max(l2_event_count, ef_event_count)
252 print(
'... '+20*
'-'+
'sizes by type')
253 for f,s
in sorted(featureSizes.items(),key=operator.itemgetter(1),reverse=
True):
255 print(
".... %-70s %6d B %6d B/ev" %(f, s, (1.*s)/event_count))
256 print(
'... '+20*
'-'+
'sizes by type#key')
257 for f,s
in sorted(featureSizes.items(),key=operator.itemgetter(1),reverse=
True):
259 print(
".... %-70s %6d B %6d B/ev" %(f, s, (1.*s)/event_count))