|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef TRIGCONFXAOD_XAODCONFIGSVC_H
8 #define TRIGCONFXAOD_XAODCONFIGSVC_H
13 #include "GaudiKernel/IIncidentListener.h"
14 #include "GaudiKernel/ServiceHandle.h"
41 #include <shared_mutex>
75 class xAODConfigSvc :
public extends<AthService, ITrigConfigSvc, IIncidentListener> {
139 virtual const HLTMenu&
hltMenu(
const EventContext& ctx = Gaudi::Hive::currentContext())
const override;
145 virtual const L1Menu&
l1Menu(
const EventContext& ctx = Gaudi::Hive::currentContext())
const override;
159 virtual void handle(
const Incident& inc )
override;
195 const bool optional =
false);
198 "Key for the event-level configuration identifier object"};
201 "Key for the event-level bunchgroup configuration identifier object. Only written from late 2021, optional input."};
205 Gaudi::Property<std::string>
m_metaName{
this,
"MetaObjectName",
"TriggerMenu",
206 "Key for the trigger configuration metadata object"};
211 Gaudi::Property< std::string >
m_metaNameJSON_hlt {
this,
"JSONMetaObjectNameHLT",
"TriggerMenuJson_HLT",
212 "StoreGate key for the xAOD::TriggerMenuJson HLT configuration object"};
215 "StoreGate key for the xAOD::TriggerMenuJson HLT monitoring configuration object"};
217 Gaudi::Property< std::string >
m_metaNameJSON_l1 {
this,
"JSONMetaObjectNameL1",
"TriggerMenuJson_L1",
218 "StoreGate key for the xAOD::TriggerMenuJson L1 configuration object"};
221 "StoreGate key for the xAOD::TriggerMenuJson HLT prescales configuration object"};
223 Gaudi::Property< std::string >
m_metaNameJSON_l1ps {
this,
"JSONMetaObjectNameL1PS",
"TriggerMenuJson_L1PS",
224 "StoreGate key for the xAOD::TriggerMenuJson L1 prescales configuration object"};
226 Gaudi::Property< std::string >
m_metaNameJSON_bg {
this,
"JSONMetaObjectNameBunchgroup",
"TriggerMenuJson_BG",
227 "StoreGate key for the xAOD::TriggerMenuJson BunchGroup configuration object"};
234 "HLT Menu Key, for when UseInFileMetadata=False. From the DetectorStore."};
237 "L1 Menu Key, for when UseInFileMetadata=False. From the DetectorStore"};
240 "HLT prescales set condition handle, for when UseInFileMetadata=False"};
243 "L1 prescales set condition handle, for when UseInFileMetadata=False"};
248 Gaudi::Property<bool>
m_useInFileMetadata{
this,
"UseInFileMetadata",
true,
"Flag for reading all configuration from the input POOL file(s). "
249 "This mode should be used everywhere except for: RAWtoALL from bytestream. "
250 "If set to false, only the R3 configuration is supported."};
252 Gaudi::Property<bool>
m_stopOnFailure{
this,
"StopOnFailure",
true,
"Flag for stopping the job in case of a failure"};
259 std::unique_ptr<xAOD::TriggerMenuAuxContainer>
m_tmcAux;
260 std::unique_ptr<xAOD::TriggerMenuContainer>
m_tmc;
270 std::unique_ptr<xAOD::TriggerMenuJsonContainer>
m_hltJson;
274 std::unique_ptr<xAOD::TriggerMenuJsonContainer>
m_l1Json;
280 std::unique_ptr<xAOD::TriggerMenuJsonContainer>
m_bgJson;
330 #endif // TRIGCONFXAOD_XAODCONFIGSVC_H
virtual const HLTPrescalesSet & hltPrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLT prescales ptree.
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_bgJsonAux
SG::SlotSpecificObj< L1Menu > m_currentL1
SG::ReadCondHandleKey< TrigConf::L1PrescalesSet > m_L1PrescaleSetKey
StatusCode readMetadata()
Function reading in a new metadata object from the input.
void copyMetadataToPersonalStore(const xAOD::TriggerMenuJsonContainer *input, xAOD::TriggerMenuJsonContainer *existing)
Helper function for copying into the service's private data store.
SG::SlotSpecificObj< L1BunchGroupSet > m_currentBg
StatusCode prepareEvent()
Function setting up the service for a new event.
virtual const CTPConfig * ctpConfig() const override
Get the LVL1 trigger menu.
SG::SlotSpecificObj< L1PrescalesSet > m_currentL1ps
StatusCode prepareEventxAODTriggerMenu(const xAOD::TrigConfKeys *keys, const EventContext &context)
Do per-event decoding for R2 in-file serialised xAOD::TriggerMenu metadata.
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_hltJson
SG::SlotSpecificObj< MenuPtrWrapper > m_menu
virtual const HLTMenu & hltMenu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMenu ptree.
std::shared_mutex m_sharedMutex
The mutex used to to restrict access to m_tmc when it is being written to.
Gaudi::Property< std::string > m_metaNameJSON_hltps
SG::SlotSpecificObj< HLTPrescalesSet > m_currentHltps
SG::SlotSpecificObj< HLTChainList > m_chainList
The "translated" HLT configuration object.
Gaudi::Property< bool > m_useInFileMetadata
Gaudi::Property< std::string > m_metaNameJSON_hltmonitoring
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentL1psJson
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentHltJson
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_l1Json
SG::SlotSpecificObj< CTPConfig > m_ctpConfig
virtual uint32_t bunchGroupSetKey() const override
Get the LVL1 bunch group set key.
virtual StatusCode initialize() override
Function initialising the service.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual uint32_t lvl1PrescaleKey() const override
Get the LVL1 prescale key.
SG::SlotSpecificObj< BunchGroupSet > m_bgSet
The "translated" bunch group set object.
Gaudi::Property< std::string > m_metaNameJSON_l1ps
Forward iterator to traverse the main components of the trigger configuration.
Maintain a set of objects, one per slot.
SG::ReadHandleKey< xAOD::BunchConfKey > m_eventBGKey
virtual void handle(const Incident &inc) override
Function handling the incoming incidents.
list of all HLT chains in a trigger menu
std::unique_ptr< xAOD::TriggerMenuContainer > m_tmc
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_l1psJson
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< xAOD::TrigConfKeys > m_eventKey
virtual const Muctpi * muctpiConfig() const override
Get the MuCTPI's online configuration.
SG::ReadHandleKey< HLTMenu > m_hltMenuKey
bool m_triggerMenuContainerAvailable
Is decoded R2 format data available?
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_hltpsJson
virtual const ThresholdConfig * thresholdConfig() const override
Get the LVL1 threshold configuruation (not available from xAOD)
virtual uint32_t masterKey() const override
Get the Super Master Key.
Gaudi::Property< std::string > m_metaNameJSON_hlt
virtual StatusCode finalize() override
Function finalising the service.
StatusCode prepareEventxAODTriggerMenuJson(const xAOD::TrigConfKeys *keys, const xAOD::BunchConfKey *bgKey, const EventContext &context)
Do per-event decoding for R3 in-file serialised xAOD::TriggerMenuJson metadata.
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_l1psJsonAux
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_hltpsJsonAux
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_hltmonitoringJsonAux
bool m_menuJSONContainerAvailable
Is decoded R3 format data available?
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSet > m_HLTPrescaleSetKey
ServiceHandle< StoreGateSvc > m_metaStore
Connection to the metadata store.
bool m_isInFailure
Internal state of the service.
Trigger configuration service used when reading an xAOD file.
Gaudi::Property< bool > m_stopOnFailure
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentBgJson
Class describing the configuration used in a given event.
Base class for Trigger configuration data and wrapper around underlying representation.
virtual const HLTChainList & chains() const override
Get the HLT chains.
HLT monitoring configuration.
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_hltJsonAux
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_L1BunchGroupSetKey
std::unique_ptr< xAOD::TriggerMenuAuxContainer > m_tmcAux
SG::SlotSpecificObj< HLTMenu > m_currentHlt
virtual const BunchGroupSet * bunchGroupSet() const override
Get the LVL1 bunch group set.
virtual const HLTMonitoring & hltMonitoring(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMonitoring ptree.
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_hltmonitoringJson
virtual const L1PrescalesSet & l1PrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 prescales ptree.
Gaudi::Property< std::string > m_metaName
std::unique_ptr< xAOD::TriggerMenuJsonContainer > m_bgJson
virtual const HLTSequenceList & sequences() const override
Get the HLT sequences.
Gaudi::Property< std::string > m_metaNameJSON_l1
StatusCode prepareEventRun3Athena(const EventContext &context)
Do per-event updating of R3 JSON-based metadata, reading the data direct from the Conditions and Dete...
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentHltpsJson
SG::SlotSpecificObj< HLTMonitoring > m_currentHltmonitoring
Maintain a set of objects, one per slot.
StatusCode loadPtree(const std::string &humanName, const xAOD::TriggerMenuJsonContainer *metaContainer, const uint32_t keyToCheck, TriggerMenuJsonPtrWrapper &cacheOfLoadedMenuPtr, DataStructure &dataStructure, const bool optional=false)
Helper function to find a JSON in a given TriggerMenuJsonContainer using a given key,...
xAODConfigSvc(const std::string &name, ISvcLocator *svcLoc)
Standard service constructor.
std::unique_ptr< xAOD::TriggerMenuJsonAuxContainer > m_l1JsonAux
virtual const L1Menu & l1Menu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 ptree.
SG::ReadHandleKey< L1Menu > m_l1MenuKey
std::string configurationSource() const override
virtual uint32_t hltPrescaleKey() const override
Get the HLT prescale key.
Gaudi::Property< std::string > m_metaNameJSON_bg
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentHltmonitoringJson
SG::SlotSpecificObj< TriggerMenuJsonPtrWrapper > m_currentL1Json
virtual const L1BunchGroupSet & l1BunchGroupSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured bunchgroup ptree.
Class identifying the bunch configuration of a given event.
SG::SlotSpecificObj< HLTSequenceList > m_sequenceList
The "translated" HLT configuration object.