Skip to content
Snippets Groups Projects
Commit 68251a24 authored by Jennifer Rachel Curran's avatar Jennifer Rachel Curran Committed by Petar Bokan
Browse files

Debug Stream Recovery, Fix Duplicated events in BS File

Reduce error to warning for empty file production and check that the stream name does not get double counted in trigbs_extractStream.py leading to duplicated events being written out
parent 077840f7
No related branches found
No related tags found
2 merge requests!708052024-04-23: merge of 24.0 into main,!70760Debug Stream Recovery, Fix Duplicated events in BS File
......@@ -302,7 +302,7 @@ class trigRecoExecutor(athenaExecutor):
raise trfExceptions.TransformExecutionException(trfExit.nameToCode('TRF_OUTPUT_FILE_ERROR'),
'Exception raised when selecting stream with trigbs_extractStream.py in file {0}: {1}'.format(allStreamsFileName, e))
if splitStreamFailure != 0:
msg.error('trigbs_extractStream.py returned error (%s) no split BS file created', splitStreamFailure)
msg.warning('trigbs_extractStream.py returned error (%s) no split BS file created', splitStreamFailure)
return 1
else:
# know that the format will be of the form ####._athenaHLT.####.data
......
......@@ -153,8 +153,14 @@ def peb_writer():
# find StreamTags and see if there is a match
streamTags = e.stream_tag()
logging.debug(' === New Event nr = %s (Run,Global ID) = (%d,%d) === ', totalEvents_in,e.run_no(),e.global_id())
#count accepted streams for each event
streamAccepted = 0
for tag in streamTags:
if tag.name in streamNames_out:
#avoid duplication of events that have > 1 streamNames_out
if streamAccepted : continue
streamAccepted += 1
# the event should be written out
logging.debug(' Matching event found for stream tag = %s', tag)
logging.debug(' Stream Tag:Robs = %s', [hex(r) for r in tag.robs])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment