23 def dbgPreRun(inputFileList, outputFileList, argdict = None):
24 msg.info(
'Running debug_stream analysis PreRun operations on files :{0} '.
format(inputFileList))
25 msg.info(
'Running debug_stream analysis PreRun, histogram output in :{0} '.
format(outputFileList))
28 outFile = outputFileList[0]
29 hfile = TFile(outFile,
'RECREATE')
31 maxEvents = argdict.get(
'maxEvents')
32 maxEvents = maxEvents.value.get(
'first')
if maxEvents
else -1
34 skipEvents = argdict.get(
'skipEvents')
35 skipEvents = skipEvents.value.get(
'first')
if skipEvents
else 0
38 eventInfo = dbgEventInfo(
'_Pre', inputFileList.value[0])
43 for inputFile
in inputFileList.value:
44 bsfile = eformat.istream(inputFile)
48 bsfile = bsfile[skipEvents:skipEvents+maxEvents]
if maxEvents > -1
else bsfile[skipEvents:]
53 runNumber = event.run_no()
if event.run_no()
else int(inputFile.split(
".")[1])
56 if not argdict.get(
'useDB'):
57 msg.debug(
"Reading chains and items from database is skipped (missing --useDB=True)")
58 l1Info, hltInfo = ([], [])
60 l1Info, hltInfo =
TriggerDBInfo(configKeys.get(
'DB'), configKeys.get(
'SMK'))
67 data = [event.run_no(), event.lumi_block(), event.global_id(),
68 event.lvl1_id(), event.bc_time_seconds(), event.bc_time_nanoseconds()]
69 msg.info(
'Event details :%s', data)
72 eventInfo.eventCount(event)
73 eventInfo.eventInfo(event, l1Info, hltInfo)
74 eventInfo.eventConfig(configKeys, event)
81 msg.info(
'Finished running debug_stream analysis PreRun operations')
83 dbAlias = configKeys.get(
'DB')
86 if 'REL' in configKeys:
90 msg.warn(
"Release not found in configuration - asetup string won't be created")