Skip to content

[ATR-20649][ATR-20368][ATR-20684] MT Updates to xAODTrigConfSvc and TriggerDecisionTool

Tim Martin requested to merge tamartin/athena:tdtAndTctThreadSafety into master

In [ATR-20649] we see a crash because we used the xAODTrigConfTool in a MT T0 monitoring job, and this does not receive an incident on file update (it only implements an asg::AsgMetadataTool interface).

We hence change this T0-style Athena configurations to instead use the xAODTrigConfSvc which implements the IIncidentListener interface (xAODTrigConfTool is kept for analysis releases).

In R2, the metadata was served directly from the file. Going off of https://indico.cern.ch/event/865226/contributions/3645335/attachments/1949275/3235075/file-incidents.pdf (cc @tsulaia), we now need to be able to serve the correct metadata when multiple events are in flight over two (or more...) files.

The xAODTrigConfSvc is hence updated to:

  • Maintain its own Aux and Interface collections of xAOD::TriggerMenu objects.
  • Obtain a unique lock to this store on BeginInputFile, and deep copy from the input file any configurations which are not already in the service's cache.
  • Obtain a shared lock to this store on BeginEvent, use SG::SlotSpecificObj wrappers to both keep track of which configuration is loaded in each slot, and the slot's decoded transient payload.
    • If a mis-match is detected in BeginEvent, the transient payload objects for the current slot are re-populated from the service's cache of xAOD::TriggerMenu objects.

Possible downsides to doing it this way:

  • The service's cache can only ever grow as it encounters new configurations in new input files, but at O(1MB) per config, I don't see this getting out of hand. The alternate would be to remove entries on EndInputFile.
  • On the file boundary there is some wasted CPU as every slot re-decodes the transient payload objects as it crosses the boundary. Again, I think this is small enough overall that it doesn't need any special treatment.

cc @akraszna as class original author, FYI @ponyisi as DQ author.


In addition, the TDT is updated to support multi-slot access by moving its CacheGlobalMemory object also into a SG::SlotSpecificObj.

It also propagates ReadHandles down to the parts of the code which unpack the per-event data.

Edited by Tim Martin

Merge request reports