[ATR-20810][ATR-24394][ATR-19834] Propagate BunchGroup into in-file metadata, add referencing key into the event store
This follows from !50215 (merged) (thanks @abarton) and compliments !47861 (merged)
BunchGroup config goes into the CondStore -> is written to the in-file metadata -> is picked up by the TrigConf::xAODConfigSvc
This MR fills in this middle part.
Unique bunch group JSONS are written into the metadata store as they are encountered, based on the bunchgroup key in every event.
Note: These JSONs are very small, few kb each uncompressed. We will typically have one per used LHC filling scheme. We only need to keep in a given AOD the JSONs which correspond to events in the AOD
In every event we write a xAOD::BunchConfKey
which associates the event with an entry in the metadata store via the key value. This works exactly like the existing xAOD:TrigConfKeys
key triplet.
Note: The payload of xAOD::BunchConfKey
is just a single int32 per event.
This resolves a long-standing but minor* issue from Run2 where we did not keep track of the BunchGroup key independently from the L1 and HLT prescale keys in the in-file payloads. As we should, all three can change independently of each other on lumi block boundaries.
(Minor in that it is very rare for the BunchGroup to change during stable beams)