Skip to content

ByteStreamCnvSvc: Move trigger info filling to connectOutput

Rafal Bielski requested to merge rbielski/athena:writebs into master

Writing to file consists of three steps: connectOutput, createRep (for each object), commitOutput. When writing to ByteStream from an offline athena job running HLT, the trigger content should be added to the file in createRep for the HLTResultMT object. When writing to ByteStream from offline athena running non-HLT job (one which doesn't produce HLT decisions during execution), the writing of the trigger content has to be done either in connectOutput or commitOutput.

Previously, the writing was done in commitOutput and it was incorrectly overwriting the content from HLTResultMT. Incorrectly for two reasons:

  1. stream tags produced by HLT are not added to EventInfo during an HLT job, they are only stored in HLTResultMT
  2. the source of the other information (xAOD::TrigDecision) was being retrieved without a key and this always failed

Solution to 1. is to move the writing from commitOutput to connectOutput. This works equally well in non-HLT job, whereas in HLT job the incomplete content is correctly overwritten later in createRep. This is implemented and fixes ATR-21547.

Solution to 2. is to simply use the right key "xTrigDecision", also done here.

While making these changes, I also ensured smart pointers are used for the cached serialised data and cleaned up the implementation a bit. Smart pointers are helpful because the cache now has to be filled in connectOutput and then cleared in commitOutput which is done automatically by the destructor of unique_ptr.

In addition, some loosely related comments are cleaned up in TriggerConfig.

cc @tsulaia, @tamartin

Merge request reports