ATLAS Offline Software
Loading...
Searching...
No Matches
TrigConf::xAODMenuWriter Class Reference

Algorithm used to write the light-weight xAOD configuration in the Run3 JSON format. More...

#include <xAODMenuWriter.h>

Inheritance diagram for TrigConf::xAODMenuWriter:

Public Member Functions

 xAODMenuWriter (const std::string &name, ISvcLocator *svcLoc)
 Regular Algorithm constructor.
virtual ~xAODMenuWriter () override=default
virtual StatusCode initialize () override
 Function initialising the algorithm.
virtual StatusCode execute (const EventContext &ctx) const override
 Function executing the algorithm.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef std::pair< uint32_t, std::pair< uint32_t, uint32_t > > TrigKey_t
 Trigger configuration key type (used just internally)
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< TrigConf::HLTMenum_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMonitoringm_HLTMonitoringKey
SG::ReadHandleKey< TrigConf::L1Menum_L1MenuKey
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSetm_HLTPrescaleSetInputKey
SG::ReadCondHandleKey< TrigConf::L1PrescalesSetm_L1PrescaleSetInputKey
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSetm_bgInputKey
Gaudi::Property< std::string > m_metaNameJSON_hlt
Gaudi::Property< std::string > m_metaNameJSON_hltmonitoring
Gaudi::Property< std::string > m_metaNameJSON_l1
Gaudi::Property< std::string > m_metaNameJSON_hltps
Gaudi::Property< std::string > m_metaNameJSON_l1ps
Gaudi::Property< std::string > m_metaNameJSON_bg
ServiceHandle< StoreGateSvcm_metaStore
ToolHandle< IKeyWriterToolm_keyWriterTool
xAOD::TriggerMenuJsonContainer *m_menuJSON_hlt ATLAS_THREAD_SAFE {}
xAOD::TriggerMenuJsonContainer *m_menuJSON_hltmonitoring ATLAS_THREAD_SAFE {}
xAOD::TriggerMenuJsonContainer *m_menuJSON_l1 ATLAS_THREAD_SAFE {}
xAOD::TriggerMenuJsonContainer *m_menuJSON_hltps ATLAS_THREAD_SAFE {}
xAOD::TriggerMenuJsonContainer *m_menuJSON_l1ps ATLAS_THREAD_SAFE {}
xAOD::TriggerMenuJsonContainer *m_menuJSON_bg ATLAS_THREAD_SAFE {}
std::set< uint32_t > m_converted_smk ATLAS_THREAD_SAFE
 Trigger configuration keys that are already converted.
std::set< uint32_t > m_converted_hltpsk ATLAS_THREAD_SAFE
std::set< uint32_t > m_converted_l1psk ATLAS_THREAD_SAFE
std::set< uint32_t > m_converted_bg ATLAS_THREAD_SAFE
std::mutex m_mutex
 The mutex to prevent us from writing more than one configuration at a time.
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Algorithm used to write the light-weight xAOD configuration in the Run3 JSON format.

   This algorithm needs to be scheduled in jobs that write xAOD
   files in Athena in order to write the trigger configuration
   into the output file.

   It puts a tiny amount of information into each event that is
   later used to find the correct configuration of the events,
   and also assembles the configuration metadata that is written
   into the metadata TTree of the xAOD file at the end of the job.
Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Tim Martin Tim.M.nosp@m.arti.nosp@m.n@cer.nosp@m.n.ch

Definition at line 54 of file xAODMenuWriter.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

◆ TrigKey_t

typedef std::pair< uint32_t, std::pair< uint32_t, uint32_t > > TrigConf::xAODMenuWriter::TrigKey_t
private

Trigger configuration key type (used just internally)

Definition at line 113 of file xAODMenuWriter.h.

Constructor & Destructor Documentation

◆ xAODMenuWriter()

TrigConf::xAODMenuWriter::xAODMenuWriter ( const std::string & name,
ISvcLocator * svcLoc )

Regular Algorithm constructor.

Definition at line 38 of file xAODMenuWriter.cxx.

40 : AthReentrantAlgorithm(name, svcLoc)
41 {
42 }

◆ ~xAODMenuWriter()

virtual TrigConf::xAODMenuWriter::~xAODMenuWriter ( )
overridevirtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TrigConf::xAODMenuWriter::execute ( const EventContext & ctx) const
overridevirtual

Function executing the algorithm.

Definition at line 140 of file xAODMenuWriter.cxx.

141 {
142
143 // Create the keys in the "internal format":
144 TrigKey_t ckeys;
145
146 // Write to SG via writer tool.
147 // Get keys back via pass-by-reference
148 ATH_CHECK(m_keyWriterTool->writeKeys(ctx, /*SMK*/ ckeys.first, /*L1PSK*/ ckeys.second.first, /*HLTPSK*/ ckeys.second.second));
149
150 uint32_t bunchgroupKey = 0;
151 ATH_CHECK(m_keyWriterTool->writeBunchgroupKey(ctx, bunchgroupKey));
152
153 // The following code must only run on one event at a time
154 std::lock_guard<std::mutex> lock(m_mutex);
155
156 if (!m_converted_smk.insert(ckeys.first).second) {
157 ATH_MSG_VERBOSE("Already converted SMK: " << ckeys.first);
158 } else {
159 ATH_MSG_DEBUG("Filling HLT Menu information for SMK:" << ckeys.first);
160 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle(m_HLTMenuKey, ctx);
161 ATH_CHECK(hltMenuHandle.isValid());
162 std::stringstream hltTriggerMenuJson;
163 hltMenuHandle->printRaw(hltTriggerMenuJson);
165 m_menuJSON_hlt->push_back(hlt); // Now owned by MetaDataStore
166 hlt->setKey(ckeys.first);
167 hlt->setName(hltMenuHandle->name());
168 hlt->setPayload(hltTriggerMenuJson.str());
170 ATH_MSG_DEBUG("Filling HLT Monitoring information for SMK:" << ckeys.first);
171 SG::ReadHandle<TrigConf::HLTMonitoring> hltMonitoringHandle(m_HLTMonitoringKey, ctx);
172 if (hltMonitoringHandle.isValid()) {
173 std::stringstream hltMonitoringJson;
174 hltMonitoringHandle->printRaw(hltMonitoringJson);
175 xAOD::TriggerMenuJson *hltmonitoring = new xAOD::TriggerMenuJson();
176 m_menuJSON_hltmonitoring->push_back(hltmonitoring); // Now owned by MetaDataStore
177 hltmonitoring->setKey(ckeys.first);
178 hltmonitoring->setName(hltMonitoringHandle->name());
179 hltmonitoring->setPayload(hltMonitoringJson.str());
180 } else {
181 ATH_MSG_DEBUG("No HLT Monitoring JSON available - skipping.");
182 }
184 ATH_MSG_DEBUG("Filling L1 information for SMK:" << ckeys.first);
185 SG::ReadHandle<TrigConf::L1Menu> l1MenuHandle = SG::makeHandle(m_L1MenuKey, ctx);
186 ATH_CHECK(l1MenuHandle.isValid());
187 std::stringstream l1TriggerMenuJson;
188 l1MenuHandle->printRaw(l1TriggerMenuJson);
190 m_menuJSON_l1->push_back(l1); // Now owned by MetaDataStore
191 l1->setKey(ckeys.first);
192 l1->setName(l1MenuHandle->name());
193 l1->setPayload(l1TriggerMenuJson.str());
194 }
195
196 if (!m_converted_hltpsk.insert(ckeys.second.second).second) {
197 ATH_MSG_VERBOSE("Already converted HLTPSK: " << ckeys.second.second);
198 } else {
199 ATH_MSG_DEBUG("Filling prescale information for HLTPSK:" << ckeys.second.second);
200 SG::ReadCondHandle<TrigConf::HLTPrescalesSet> hltPSHandle(m_HLTPrescaleSetInputKey, ctx);
201 ATH_CHECK(hltPSHandle.isValid());
202 std::stringstream hltPSJSON;
203 hltPSHandle->printRaw(hltPSJSON);
205 m_menuJSON_hltps->push_back(hltps); // Now owned by MetaDataStore
206 hltps->setKey(ckeys.second.second);
207 hltps->setName(hltPSHandle->name());
208 hltps->setPayload(hltPSJSON.str());
209 }
210
211 if (!m_converted_l1psk.insert(ckeys.second.first).second) {
212 ATH_MSG_VERBOSE("Already converted LVL1PSK: " << ckeys.second.first);
213 } else {
214 ATH_MSG_DEBUG("Filling prescale information for LVL1PSK:" << ckeys.second.first);
215 SG::ReadCondHandle<TrigConf::L1PrescalesSet> l1PSHandle(m_L1PrescaleSetInputKey, ctx);
216 ATH_CHECK(l1PSHandle.isValid());
217 std::stringstream l1PSJSON;
218 l1PSHandle->printRaw(l1PSJSON);
220 m_menuJSON_l1ps->push_back(l1ps); // Now owned by MetaDataStore
221 l1ps->setKey(ckeys.second.first);
222 l1ps->setName(l1PSHandle->name());
223 l1ps->setPayload(l1PSJSON.str());
224 }
225
226 if (!m_converted_bg.insert(bunchgroupKey).second) {
227 ATH_MSG_VERBOSE("Already converted Bunchgroup Key: " << bunchgroupKey);
228 } else {
229 ATH_MSG_DEBUG("Filling prescale information for Bunchgroup Key:" << bunchgroupKey);
230 SG::ReadCondHandle<TrigConf::L1BunchGroupSet> bunchgroupHandle(m_bgInputKey, ctx);
231 ATH_CHECK(bunchgroupHandle.isValid());
232 std::stringstream l1BunchgroupJSON;
233 bunchgroupHandle->printRaw(l1BunchgroupJSON);
235 m_menuJSON_bg->push_back(l1bg); // Now owned by MetaDataStore
236 l1bg->setKey(bunchgroupKey);
237 l1bg->setName(bunchgroupHandle->name());
238 l1bg->setPayload(l1BunchgroupJSON.str());
239 }
240
241 // Return gracefully:
242 return StatusCode::SUCCESS;
243 }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
SG::ReadHandleKey< TrigConf::HLTMonitoring > m_HLTMonitoringKey
ToolHandle< IKeyWriterTool > m_keyWriterTool
SG::ReadCondHandleKey< TrigConf::HLTPrescalesSet > m_HLTPrescaleSetInputKey
SG::ReadCondHandleKey< TrigConf::L1PrescalesSet > m_L1PrescaleSetInputKey
std::mutex m_mutex
The mutex to prevent us from writing more than one configuration at a time.
SG::ReadCondHandleKey< TrigConf::L1BunchGroupSet > m_bgInputKey
std::pair< uint32_t, std::pair< uint32_t, uint32_t > > TrigKey_t
Trigger configuration key type (used just internally)
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
void setPayload(const std::string &payload)
Set the JSON payload.
void setName(const std::string &name)
Set the name key of this configuration.
void setKey(uint32_t value)
Set the key of this configuration.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
TriggerMenuJson_v1 TriggerMenuJson
Define the latest version of the trigger menu JSON class.
setEventNumber uint32_t

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode TrigConf::xAODMenuWriter::initialize ( )
overridevirtual

Function initialising the algorithm.

Definition at line 44 of file xAODMenuWriter.cxx.

45 {
46
47 // Greet the user:
48 ATH_MSG_INFO("Initialising");
49 ATH_MSG_VERBOSE("MetaDataStore = " << m_metaStore);
50
51 // Retrieve the necessary service(s):
52 ATH_CHECK(m_metaStore.retrieve());
53
54 ATH_CHECK(m_keyWriterTool.retrieve());
55
56 ATH_CHECK(m_HLTMenuKey.initialize()); // ReadHandleKey, but DetStore (so renounce)
58 ATH_CHECK(m_HLTMonitoringKey.initialize()); // ReadHandleKey, but DetStore (so renounce)
60 ATH_CHECK(m_HLTPrescaleSetInputKey.initialize()); // ReadCondHandleKey
61
62 ATH_CHECK(m_L1MenuKey.initialize()); // ReadHandleKey, but DetStore (so renounce)
64 ATH_CHECK(m_L1PrescaleSetInputKey.initialize()); // ReadCondHandleKey
65
66 ATH_CHECK(m_bgInputKey.initialize()); // ReadCondHandleKey
67
68 // HLT JSON object - contains HLT menus
69 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_hlt = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
70 std::unique_ptr<xAOD::TriggerMenuJsonContainer> hlt = std::make_unique<xAOD::TriggerMenuJsonContainer>();
71 //all the static checkers are trying to tell us something...
72 //coverity[WRAPPER_ESCAPE]
73 // cppcheck-suppress danglingLifetime; false positive
74 m_menuJSON_hlt = hlt.get(); // Keep a cached pointer from which we can add to the output metastore
75 // cppcheck-suppress danglingLifetime; false positive
76 m_menuJSON_hlt->setStore(aux_hlt.get());
77
78 ATH_CHECK(m_metaStore->record(std::move(aux_hlt), m_metaNameJSON_hlt + "Aux."));
79 ATH_CHECK(m_metaStore->record(std::move(hlt), m_metaNameJSON_hlt));
80
81 // HLT Monitoring JSON object - contains Monitoring groups for HLT menus
82 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_hltmonitoring = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
83 std::unique_ptr<xAOD::TriggerMenuJsonContainer> hltmonitoring = std::make_unique<xAOD::TriggerMenuJsonContainer>();
84 // cppcheck-suppress danglingLifetime; false positive
85 m_menuJSON_hltmonitoring = hltmonitoring.get(); // Keep a cached pointer from which we can add to the output metastore
86 // cppcheck-suppress danglingLifetime; false positive
87 m_menuJSON_hltmonitoring->setStore(aux_hltmonitoring.get());
88
89 ATH_CHECK(m_metaStore->record(std::move(aux_hltmonitoring), m_metaNameJSON_hltmonitoring + "Aux."));
90 ATH_CHECK(m_metaStore->record(std::move(hltmonitoring), m_metaNameJSON_hltmonitoring));
91
92 // L1 JSON object - contains L1 menus
93 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_l1 = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
94 std::unique_ptr<xAOD::TriggerMenuJsonContainer> l1 = std::make_unique<xAOD::TriggerMenuJsonContainer>();
95 // cppcheck-suppress danglingLifetime; false positive
96 m_menuJSON_l1 = l1.get(); // Keep a cached pointer from which we can add to the output metastore
97 // cppcheck-suppress danglingLifetime; false positive
98 m_menuJSON_l1->setStore(aux_l1.get());
99
100 ATH_CHECK(m_metaStore->record(std::move(aux_l1), m_metaNameJSON_l1 + "Aux."));
101 ATH_CHECK(m_metaStore->record(std::move(l1), m_metaNameJSON_l1));
102
103 // HLT PS JSON object - contains prescales sets for HLT menus
104 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_hltps = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
105 std::unique_ptr<xAOD::TriggerMenuJsonContainer> hltps = std::make_unique<xAOD::TriggerMenuJsonContainer>();
106 // cppcheck-suppress danglingLifetime; false positive
107 m_menuJSON_hltps = hltps.get(); // Keep a cached pointer from which we can add to the output metastore
108 // cppcheck-suppress danglingLifetime; false positive
109 m_menuJSON_hltps->setStore(aux_hltps.get());
110
111 ATH_CHECK(m_metaStore->record(std::move(aux_hltps), m_metaNameJSON_hltps + "Aux."));
112 ATH_CHECK(m_metaStore->record(std::move(hltps), m_metaNameJSON_hltps));
113
114 // L1 PS JSON object - contains prescales sets for L1 menus
115 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_l1ps = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
116 std::unique_ptr<xAOD::TriggerMenuJsonContainer> l1ps = std::make_unique<xAOD::TriggerMenuJsonContainer>();
117 // cppcheck-suppress danglingLifetime; false positive
118 m_menuJSON_l1ps = l1ps.get(); // Keep a cached pointer from which we can add to the output metastore
119 // cppcheck-suppress danglingLifetime; false positive
120 m_menuJSON_l1ps->setStore(aux_l1ps.get());
121
122 ATH_CHECK(m_metaStore->record(std::move(aux_l1ps), m_metaNameJSON_l1ps + "Aux."));
123 ATH_CHECK(m_metaStore->record(std::move(l1ps), m_metaNameJSON_l1ps));
124
125 // Bunchgroup JSON object - contains bungchgroup configuration
126 std::unique_ptr<xAOD::TriggerMenuJsonAuxContainer> aux_bg = std::make_unique<xAOD::TriggerMenuJsonAuxContainer>();
127 std::unique_ptr<xAOD::TriggerMenuJsonContainer> bg = std::make_unique<xAOD::TriggerMenuJsonContainer>();
128 // cppcheck-suppress danglingLifetime; false positive
129 m_menuJSON_bg = bg.get(); // Keep a cached pointer from which we can add to the output metastore
130 // cppcheck-suppress danglingLifetime; false positive
131 m_menuJSON_bg->setStore( aux_bg.get() );
132
133 ATH_CHECK( m_metaStore->record(std::move(aux_bg), m_metaNameJSON_bg + "Aux." ) );
134 ATH_CHECK( m_metaStore->record(std::move(bg), m_metaNameJSON_bg ) );
135
136 // Return gracefully:
137 return StatusCode::SUCCESS;
138 }
#define ATH_MSG_INFO(x)
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
Gaudi::Property< std::string > m_metaNameJSON_bg
Gaudi::Property< std::string > m_metaNameJSON_hltps
Gaudi::Property< std::string > m_metaNameJSON_hlt
Gaudi::Property< std::string > m_metaNameJSON_l1ps
Gaudi::Property< std::string > m_metaNameJSON_l1
ServiceHandle< StoreGateSvc > m_metaStore
Gaudi::Property< std::string > m_metaNameJSON_hltmonitoring

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_hlt TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 116 of file xAODMenuWriter.h.

116{};

◆ ATLAS_THREAD_SAFE [2/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_hltmonitoring TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 117 of file xAODMenuWriter.h.

117{};

◆ ATLAS_THREAD_SAFE [3/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_l1 TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 118 of file xAODMenuWriter.h.

118{};

◆ ATLAS_THREAD_SAFE [4/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_hltps TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 119 of file xAODMenuWriter.h.

119{};

◆ ATLAS_THREAD_SAFE [5/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_l1ps TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 120 of file xAODMenuWriter.h.

120{};

◆ ATLAS_THREAD_SAFE [6/10]

xAOD::TriggerMenuJsonContainer* m_menuJSON_bg TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE {}
mutableprivate

Definition at line 121 of file xAODMenuWriter.h.

121{};

◆ ATLAS_THREAD_SAFE [7/10]

std::set< uint32_t > m_converted_smk TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE
mutableprivate

Trigger configuration keys that are already converted.

Definition at line 124 of file xAODMenuWriter.h.

◆ ATLAS_THREAD_SAFE [8/10]

std::set< uint32_t > m_converted_hltpsk TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 125 of file xAODMenuWriter.h.

◆ ATLAS_THREAD_SAFE [9/10]

std::set< uint32_t > m_converted_l1psk TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 126 of file xAODMenuWriter.h.

◆ ATLAS_THREAD_SAFE [10/10]

std::set< uint32_t > m_converted_bg TrigConf::xAODMenuWriter::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 127 of file xAODMenuWriter.h.

◆ m_bgInputKey

SG::ReadCondHandleKey<TrigConf::L1BunchGroupSet> TrigConf::xAODMenuWriter::m_bgInputKey
private
Initial value:
{this, "L1BunchGroup", "L1BunchGroup",
"L1BunchGroupSet condition handl"}

Definition at line 85 of file xAODMenuWriter.h.

85 {this, "L1BunchGroup", "L1BunchGroup",
86 "L1BunchGroupSet condition handl"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_HLTMenuKey

SG::ReadHandleKey<TrigConf::HLTMenu> TrigConf::xAODMenuWriter::m_HLTMenuKey
private
Initial value:
{this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu",
"HLT Menu key"}

Definition at line 70 of file xAODMenuWriter.h.

70 {this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu",
71 "HLT Menu key"};

◆ m_HLTMonitoringKey

SG::ReadHandleKey<TrigConf::HLTMonitoring> TrigConf::xAODMenuWriter::m_HLTMonitoringKey
private
Initial value:
{this, "HLTMonitoringMenu", "DetectorStore+HLTMonitoringMenu",
"HLT Monitoring key"}

Definition at line 73 of file xAODMenuWriter.h.

73 {this, "HLTMonitoringMenu", "DetectorStore+HLTMonitoringMenu",
74 "HLT Monitoring key"};

◆ m_HLTPrescaleSetInputKey

SG::ReadCondHandleKey<TrigConf::HLTPrescalesSet> TrigConf::xAODMenuWriter::m_HLTPrescaleSetInputKey
private
Initial value:
{this, "HLTPrescales", "HLTPrescales",
"HLT prescales set condition handle"}

Definition at line 79 of file xAODMenuWriter.h.

79 {this, "HLTPrescales", "HLTPrescales",
80 "HLT prescales set condition handle"};

◆ m_keyWriterTool

ToolHandle<IKeyWriterTool> TrigConf::xAODMenuWriter::m_keyWriterTool
private
Initial value:
{this, "KeyWriterTool", "KeyWriterTool/OfflineKeyWriterTool",
"Writes the keys which are configured when the trigger configuration is written to in-file metadata."}

Definition at line 109 of file xAODMenuWriter.h.

109 {this, "KeyWriterTool", "KeyWriterTool/OfflineKeyWriterTool",
110 "Writes the keys which are configured when the trigger configuration is written to in-file metadata."};

◆ m_L1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> TrigConf::xAODMenuWriter::m_L1MenuKey
private
Initial value:
{this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu",
"L1 Menu key"}

Definition at line 76 of file xAODMenuWriter.h.

76 {this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu",
77 "L1 Menu key"};

◆ m_L1PrescaleSetInputKey

SG::ReadCondHandleKey<TrigConf::L1PrescalesSet> TrigConf::xAODMenuWriter::m_L1PrescaleSetInputKey
private
Initial value:
{this, "L1Prescales", "L1Prescales",
"L1 prescales set condition handle"}

Definition at line 82 of file xAODMenuWriter.h.

82 {this, "L1Prescales", "L1Prescales",
83 "L1 prescales set condition handle"};

◆ m_metaNameJSON_bg

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_bg
private
Initial value:
{this, "JSONMetaObjectNameBunchgroup", "TriggerMenuJson_BG",
"StoreGate key for the xAOD::TriggerMenuJson BunchGroup configuration object"}

Definition at line 103 of file xAODMenuWriter.h.

103 {this, "JSONMetaObjectNameBunchgroup", "TriggerMenuJson_BG",
104 "StoreGate key for the xAOD::TriggerMenuJson BunchGroup configuration object"};

◆ m_metaNameJSON_hlt

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_hlt
private
Initial value:
{this, "JSONMetaObjectNameHLT", "TriggerMenuJson_HLT",
"StoreGate key for the xAOD::TriggerMenuJson HLT configuration object"}

Definition at line 88 of file xAODMenuWriter.h.

88 {this, "JSONMetaObjectNameHLT", "TriggerMenuJson_HLT",
89 "StoreGate key for the xAOD::TriggerMenuJson HLT configuration object"};

◆ m_metaNameJSON_hltmonitoring

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_hltmonitoring
private
Initial value:
{this, "JSONMetaObjectNameHLTMonitoring", "TriggerMenuJson_HLTMonitoring",
"StoreGate key for the xAOD::TriggerMenuJson HLT Monitoring configuration object"}

Definition at line 91 of file xAODMenuWriter.h.

91 {this, "JSONMetaObjectNameHLTMonitoring", "TriggerMenuJson_HLTMonitoring",
92 "StoreGate key for the xAOD::TriggerMenuJson HLT Monitoring configuration object"};

◆ m_metaNameJSON_hltps

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_hltps
private
Initial value:
{this, "JSONMetaObjectNameHLTPS", "TriggerMenuJson_HLTPS",
"StoreGate key for the xAOD::TriggerMenuJson HLT prescales configuration object"}

Definition at line 97 of file xAODMenuWriter.h.

97 {this, "JSONMetaObjectNameHLTPS", "TriggerMenuJson_HLTPS",
98 "StoreGate key for the xAOD::TriggerMenuJson HLT prescales configuration object"};

◆ m_metaNameJSON_l1

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_l1
private
Initial value:
{this, "JSONMetaObjectNameL1", "TriggerMenuJson_L1",
"StoreGate key for the xAOD::TriggerMenuJson L1 configuration object"}

Definition at line 94 of file xAODMenuWriter.h.

94 {this, "JSONMetaObjectNameL1", "TriggerMenuJson_L1",
95 "StoreGate key for the xAOD::TriggerMenuJson L1 configuration object"};

◆ m_metaNameJSON_l1ps

Gaudi::Property< std::string > TrigConf::xAODMenuWriter::m_metaNameJSON_l1ps
private
Initial value:
{this, "JSONMetaObjectNameL1PS", "TriggerMenuJson_L1PS",
"StoreGate key for the xAOD::TriggerMenuJson L1 prescales configuration object"}

Definition at line 100 of file xAODMenuWriter.h.

100 {this, "JSONMetaObjectNameL1PS", "TriggerMenuJson_L1PS",
101 "StoreGate key for the xAOD::TriggerMenuJson L1 prescales configuration object"};

◆ m_metaStore

ServiceHandle< StoreGateSvc > TrigConf::xAODMenuWriter::m_metaStore
private
Initial value:
{this, "MetaDataStore", "StoreGateSvc/MetaDataStore",
"The MetaDataStore"}

Definition at line 106 of file xAODMenuWriter.h.

106 {this, "MetaDataStore", "StoreGateSvc/MetaDataStore",
107 "The MetaDataStore"};

◆ m_mutex

std::mutex TrigConf::xAODMenuWriter::m_mutex
mutableprivate

The mutex to prevent us from writing more than one configuration at a time.

Definition at line 130 of file xAODMenuWriter.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: