ATLAS Offline Software
Loading...
Searching...
No Matches
xAODConfigTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5// System include(s):
6#include <stdexcept>
7
8// Trigger include(s):
11
12// Local include(s):
16
17// Boost includes
18#define BOOST_BIND_GLOBAL_PLACEHOLDERS // Needed to silence Boost pragma message
19#include <boost/property_tree/ptree.hpp>
20#include <boost/property_tree/json_parser.hpp>
21
22namespace TrigConf {
23
50
53 m_tmc( nullptr ),
54 m_hltJson( nullptr), m_hltmonitoringJson(nullptr), m_l1Json( nullptr ),
55 m_hltpsJson( nullptr ), m_l1psJson( nullptr ), m_bgJson( nullptr ),
56 m_menu( nullptr ),
57 m_currentHltJson( nullptr ), m_currentHltmonitoringJson( nullptr ), m_currentL1Json( nullptr ),
58 m_currentHltpsJson( nullptr ), m_currentL1psJson( nullptr ), m_currentBgJson( nullptr ),
61 m_impl (std::make_unique<Impl>()) {
62
63 declareProperty( "EventObjectName", m_eventName = "TrigConfKeys" );
64 declareProperty( "BGKeysObjectName", m_bgkeysName = "BunchConfKey" );
65 declareProperty( "MetaObjectName", m_metaName_run2 = "TriggerMenu" );
66
67 declareProperty( "JSONMetaObjectNameHLT", m_metaNameJSON_hlt = "TriggerMenuJson_HLT" );
68 declareProperty( "JSONMetaObjectNameHLTMonitoring", m_metaNameJSON_hltmonitoring = "TriggerMenuJson_HLTMonitoring" );
69 declareProperty( "JSONMetaObjectNameL1", m_metaNameJSON_l1 = "TriggerMenuJson_L1" );
70 declareProperty( "JSONMetaObjectNameHLTPS", m_metaNameJSON_hltps = "TriggerMenuJson_HLTPS" );
71 declareProperty( "JSONMetaObjectNameL1PS", m_metaNameJSON_l1ps = "TriggerMenuJson_L1PS" );
72 declareProperty( "JSONMetaObjectNameBunchgroup", m_metaNameJSON_bg = "TriggerMenuJson_BG" );
73 }
74
75 // Defined here rather than in the header because it requires the knowledge of Impl defined above
77
79
80 // Greet the user:
81 ATH_MSG_INFO( "Initialising..." );
82 ATH_MSG_DEBUG( "EventObjectName = " << m_eventName );
83 ATH_MSG_DEBUG( "-- Run 2 AOD Configuration Settings");
84 ATH_MSG_DEBUG( "MetaObjectName = " << m_metaName_run2 );
85 ATH_MSG_DEBUG( "-- Run 3 AOD Configuration Settings");
86 ATH_MSG_DEBUG( "JSONMetaObjectNameHLT = " << m_metaNameJSON_hlt );
87 ATH_MSG_DEBUG( "JSONMetaObjectNameHLTMonitoring = " << m_metaNameJSON_hltmonitoring );
88 ATH_MSG_DEBUG( "JSONMetaObjectNameL1 = " << m_metaNameJSON_l1 );
89 ATH_MSG_DEBUG( "JSONMetaObjectNameHLTPS = " << m_metaNameJSON_hltps );
90 ATH_MSG_DEBUG( "JSONMetaObjectNameL1PS = " << m_metaNameJSON_l1ps );
91 ATH_MSG_DEBUG( "JSONMetaObjectNameBunchgroup = " << m_metaNameJSON_bg );
92
93 // Reset the pointers:
94 m_tmc = nullptr;
95 m_menu = nullptr;
96 //
97 m_hltJson = nullptr;
98 m_hltmonitoringJson = nullptr;
99 m_l1Json = nullptr;
100 m_hltpsJson = nullptr;
101 m_l1psJson = nullptr;
102 m_bgJson = nullptr;
103 m_currentHltJson = nullptr;
105 m_currentL1Json = nullptr;
106 m_currentHltpsJson = nullptr;
107 m_currentL1psJson = nullptr;
108 m_currentBgJson = nullptr;
109
110 // Return gracefully:
111 return StatusCode::SUCCESS;
112 }
113
115 // Check if the object is well prepared:
116 if( m_impl->m_ctpConfig.menu().size() == 0 ) {
117 ATH_MSG_FATAL( "Trigger menu not loaded" );
118 throw std::runtime_error( "Tool not initialised correctly" );
119 }
120
121 // Return the pointer:
122 return &m_impl->m_ctpConfig;
123 }
124
126 // Check if the object is well prepared:
127 if( m_impl->m_bgSet.bunchGroups().size() == 0 ) {
128 ATH_MSG_FATAL( "Trigger menu not loaded" );
129 throw std::runtime_error( "Tool not initialised correctly" );
130 }
131
132 // Return the pointer:
133 return &m_impl->m_bgSet;
134 }
135
138
139 return m_currentL1psJson->key();
140
141 } else {
142
143 // Check if the object is well prepared:
144 if( ! m_menu ) {
145 ATH_MSG_FATAL( "Trigger menu not loaded" );
146 throw std::runtime_error( "Tool not initialised correctly" );
147 }
148
149 // Return the key from the metadata object:
150 return m_menu->l1psk();
151
152 }
153 }
154
156 {
158 return m_impl->m_currentBg.bgsk();
159 else {
160 ATH_MSG_DEBUG("There's no way to access the bunch group set key from a legacy AOD!");
161 return std::numeric_limits<uint32_t>::max();
162 }
163 }
164
166 // Check if the object is well prepared:
167 if( m_impl->m_chainList.size() == 0 ) {
168 ATH_MSG_FATAL( "Trigger menu not loaded" );
169 throw std::runtime_error( "Tool not initialised correctly" );
170 }
171
172 // Return the object:
173 return m_impl->m_chainList;
174 }
175
177 // Check if the object is well prepared:
178 if( m_impl->m_sequenceList.size() == 0 ) {
179 ATH_MSG_FATAL( "Trigger menu not loaded" );
180 throw std::runtime_error( "Tool not initialised correctly" );
181 }
182
183 // Return the object:
184 return m_impl->m_sequenceList;
185 }
186
187 uint32_t xAODConfigTool::masterKey() const {
189
190 return m_currentHltJson->key();
191
192 } else {
193
194 // Check if the object is well prepared:
195 if( ! m_menu ) {
196 ATH_MSG_FATAL( "Trigger menu not loaded" );
197 throw std::runtime_error( "Tool not initialised correctly" );
198 }
199
200 // Return the key from the metadata object:
201 return m_menu->smk();
202
203 }
204 }
205
208
209 return m_currentHltpsJson->key();
210
211 } else {
212
213 // Check if the object is well prepared:
214 if( ! m_menu ) {
215 ATH_MSG_FATAL( "Trigger menu not loaded" );
216 throw std::runtime_error( "Tool not initialised correctly" );
217 }
218
219 // Return the key from the metadata object:
220 return m_menu->hltpsk();
221
222 }
223 }
224
225 const HLTMenu& xAODConfigTool::hltMenu(const EventContext&) const {
227 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
228 throw std::runtime_error( "Tool not initialised correctly" );
229 }
230 return m_impl->m_currentHlt;
231 }
232
233 const HLTMonitoring& xAODConfigTool::hltMonitoring(const EventContext&) const {
235 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
236 throw std::runtime_error( "Tool not initialised correctly" );
237 }
238 return m_impl->m_currentHltmonitoring;
239 }
240
241 const L1Menu& xAODConfigTool::l1Menu(const EventContext&) const {
243 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
244 throw std::runtime_error( "Tool not initialised correctly" );
245 }
246 return m_impl->m_currentL1;
247 }
248
249 const HLTPrescalesSet& xAODConfigTool::hltPrescalesSet(const EventContext&) const {
251 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
252 throw std::runtime_error( "Tool not initialised correctly" );
253 }
254 return m_impl->m_currentHltps;
255 }
256
257 const L1PrescalesSet& xAODConfigTool::l1PrescalesSet(const EventContext&) const {
259 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
260 throw std::runtime_error( "Tool not initialised correctly" );
261 }
262 return m_impl->m_currentL1ps;
263 }
264
265 const L1BunchGroupSet& xAODConfigTool::l1BunchGroupSet(const EventContext&) const {
267 ATH_MSG_FATAL( "Run 3 format Trigger menu not loaded" );
268 throw std::runtime_error( "Tool not initialised correctly" );
269 }
270 return m_impl->m_currentBg;
271 }
272
274
275 // Tell the user what's happening:
276 ATH_MSG_DEBUG( "Loading the trigger menu from a new input file" );
277
278 // Try to read the R2 metadata object:
279 m_tmc = nullptr;
282 or inputMetaStore()->retrieve( m_tmc, m_metaName_run2 ).isFailure() )
283 {
285 }
286
287 // Try to read the R3 metadata object:
288 m_hltJson = nullptr;
289 m_hltmonitoringJson = nullptr;
290 m_l1Json = nullptr;
291 m_hltpsJson = nullptr;
292 m_l1psJson = nullptr;
293 m_bgJson = nullptr;
296 or inputMetaStore()->retrieve( m_hltJson, m_metaNameJSON_hlt ).isFailure() )
297 {
299 }
302 {
303 // m_menuJSONContainerAvailable = false;
304 // Currently planning on only storing these data in MC. Hence this has to be an optional input.
305 }
307 or inputMetaStore()->retrieve( m_l1Json, m_metaNameJSON_l1 ).isFailure() )
308 {
310 }
312 or inputMetaStore()->retrieve( m_hltpsJson, m_metaNameJSON_hltps ).isFailure() )
313 {
315 }
317 or inputMetaStore()->retrieve( m_l1psJson, m_metaNameJSON_l1ps ).isFailure() )
318 {
320 }
322 or inputMetaStore()->retrieve( m_bgJson, m_metaNameJSON_bg ).isFailure() ) {
323 // m_menuJSONContainerAvailable = false;
324 // This was not written up to the end of 2021, we have to make it optional for at least a while
325 }
326
327
329 ATH_MSG_WARNING( "No trigger configurations are available on "
330 "the input" );
331 return StatusCode::SUCCESS;
332 }
333
334 // Prefer run three format, if available
336
337 // A little sanity check:
338 if( m_hltJson->size() == 0 ) {
339 // This can happen when we encounter empty input files. In which
340 // case we should not bail, but continue, and only bail if by the
341 // start of an event, we still don't see any configurations.
342 ATH_MSG_WARNING( "No trigger configurations are available on "
343 "the input" );
344 return StatusCode::SUCCESS;
345 }
346
347 // Load the first elements by default
348 ATH_CHECK( m_hltJson->size() > 0 );
349 //ATH_CHECK( m_hltmonitoringJson->size() > 0 ); // Optional - re-enable this check in the future when all used AODs contains this
350 ATH_CHECK( m_l1Json->size() > 0 );
351 ATH_CHECK( m_hltpsJson->size() > 0 );
352 ATH_CHECK( m_l1psJson->size() > 0 );
353 if (m_bgJson) { // Considered optional for now
354 ATH_CHECK( m_bgJson->size() > 0 );
355 }
356
357 m_currentHltJson = m_hltJson->at( 0 );
358 if (m_hltmonitoringJson && m_hltmonitoringJson->size()) { // Optional
360 }
361 m_currentL1Json = m_l1Json->at( 0 );
363 m_currentL1psJson = m_l1psJson->at( 0 );
364 if (m_bgJson) { // Considered optional for now
365 m_currentBgJson = m_bgJson->at( 0 );
366 }
367
369
370 // Loading the payload doesn't additionally let the object know about its own key. We can load this in now too.
371 m_impl->m_currentHlt.setSMK( m_currentHltJson->key() );
372 if (m_currentHltmonitoringJson) { // Optional
373 m_impl->m_currentHltmonitoring.setSMK( m_currentHltmonitoringJson->key() );
374 }
375 m_impl->m_currentL1.setSMK( m_currentL1Json->key() );
376 m_impl->m_currentHltps.setPSK( m_currentHltpsJson->key() );
377 m_impl->m_currentL1ps.setPSK( m_currentL1psJson->key() );
378 if (m_bgJson) { // Optional (for now)
379 m_impl->m_currentBg.setBGSK( m_currentBgJson->key() );
380 }
381
382 ATH_CHECK( prepareTriggerMenu( m_impl->m_currentHlt,
383 m_impl->m_currentL1,
384 m_impl->m_currentHltps,
385 m_impl->m_currentL1ps,
386 m_impl->m_currentBg,
387 m_impl->m_ctpConfig,
388 m_impl->m_chainList,
389 m_impl->m_sequenceList,
390 m_impl->m_bgSet, msg() ) );
391
392 return StatusCode::SUCCESS;
393
395
396 // A little sanity check:
397 if( m_tmc->size() == 0 ) {
398 // This can happen when we encounter empty input files. In which
399 // case we should not bail, but continue, and only bail if by the
400 // start of an event, we still don't see any configurations.
401 ATH_MSG_WARNING( "No trigger configurations are available on "
402 "the input" );
403 return StatusCode::SUCCESS;
404 }
405
406 m_menu = m_tmc->at( 0 );
407 // Cache the menu's configuration:
409 m_impl->m_chainList,
410 m_impl->m_sequenceList,
411 m_impl->m_bgSet, msg() ) );
412
413 return StatusCode::SUCCESS;
414 }
415
416 ATH_MSG_ERROR( "Both m_menuJSONContainerAvailable and m_triggerMenuContainerAvailable are false");
417 return StatusCode::FAILURE; // Should never get here as checked that one or the other is true above
418 }
419
421
422 // It may be that the input file opening event is missed in standalone
423 // mode at the very beginning of the application. (Depending on the
424 // creation order of the objects.) So make sure that we have the
425 // configuration objects at hand...
428 }
429
430 // Read the current event's trigger keys:
431 const xAOD::TrigConfKeys* keys = nullptr;
432 ATH_CHECK( evtStore()->retrieve( keys, m_eventName ) );
433
434 const xAOD::BunchConfKey* bgKey = nullptr; // The BG key is currently optional, only files written from late 2021 will contain this
436 ATH_CHECK(evtStore()->retrieve(bgKey, m_bgkeysName));
437 }
438
439 // Prefer Run 3 data if available
441 return beginEvent_Run3(keys, bgKey);
443 return beginEvent_Run2(keys);
444 }
445
446 ATH_MSG_ERROR( "Both m_menuJSONContainerAvailable and m_triggerMenuContainerAvailable are false");
447 return StatusCode::FAILURE;
448
449 }
450
452 // Check if we have the correct menu already:
453 if( m_menu && xAODKeysMatch( keys, m_menu ) ) {
454 return StatusCode::SUCCESS;
455 }
456
457 // If not, let's look for the correct configuration:
460 for( ; menu_itr != menu_end; ++menu_itr ) {
461 // Check if this is the menu we're looking for:
462 if( ! xAODKeysMatch( keys, *menu_itr ) ) continue;
463 // Remember it's pointer:
464 m_menu = *menu_itr;
465 // Cache the menu's configuration:
467 m_impl->m_chainList,
468 m_impl->m_sequenceList,
469 m_impl->m_bgSet, msg() ) );
470 // We're done:
471 return StatusCode::SUCCESS;
472 }
473
474 // Apparently we didn't find the correct menu!
475 ATH_MSG_ERROR( "Couldn't find configuration for current event (SMK:"
476 << keys->smk() << ", L1PSK:" << keys->l1psk()
477 << ", HLTPSK:" << keys->hltpsk() << ")" );
478 return StatusCode::FAILURE;
479 }
480
482 if (keys==nullptr) {
483 ATH_MSG_ERROR("nullptr TrigConfKeys");
484 return StatusCode::FAILURE;
485 }
486
487 // Check if we have the correct menu already:
488 bool validConfig = true;
489 if (m_currentHltJson->key() != keys->smk()) {
490 validConfig = false;
491 }
492 // m_currentHltminitoringJson is checked by the m_currentHltJson check
493 if (m_currentL1Json->key() != keys->smk()) {
494 validConfig = false;
495 }
496 if (m_currentHltpsJson->key() != keys->hltpsk()) {
497 validConfig = false;
498 }
499 if (m_currentL1psJson->key() != keys->l1psk()) {
500 validConfig = false;
501 }
502 if (m_bgJson && m_currentBgJson && bgKey && m_currentBgJson->key() != static_cast<unsigned int>(bgKey->id())) {
503 validConfig = false;
504 }
505
506 if (validConfig) {
507 return StatusCode::SUCCESS;
508 }
509
510 // If not, load correct JSON menus from their respective containers, matching against the event's keys ...
511 ATH_CHECK( loadJsonByKey("HLT Menu", m_hltJson, keys->smk(), m_currentHltJson) );
513 ATH_CHECK( loadJsonByKey("HLT Monitoring", m_hltmonitoringJson, keys->smk(), m_currentHltmonitoringJson) );
514 }
515 ATH_CHECK( loadJsonByKey("L1 Menu", m_l1Json, keys->smk(), m_currentL1Json) );
516 ATH_CHECK( loadJsonByKey("HLT Prescales", m_hltpsJson, keys->hltpsk(), m_currentHltpsJson) );
517 ATH_CHECK( loadJsonByKey("L1 Prescales", m_l1psJson, keys->l1psk(), m_currentL1psJson) );
518 if (m_bgJson && bgKey) {
519 ATH_CHECK( loadJsonByKey("Bunchgroups", m_bgJson, bgKey->id(), m_currentBgJson) );
520 }
521
522 // ... and from these serialised JSON strings, populate the ptree data structures...
523 ATH_CHECK( loadPtrees() );
524
525 // ... and set the keys of the objects in the objects (not part of the JSON pyaload) ...
526 m_impl->m_currentHlt.setSMK( m_currentHltJson->key() );
528 m_impl->m_currentHltmonitoring.setSMK( m_currentHltmonitoringJson->key() );
529 }
530 m_impl->m_currentL1.setSMK( m_currentL1Json->key() );
531 m_impl->m_currentHltps.setPSK( m_currentHltpsJson->key() );
532 m_impl->m_currentL1ps.setPSK( m_currentL1psJson->key() );
533 if (m_bgJson && bgKey) {
534 m_impl->m_currentBg.setBGSK( m_currentBgJson->key() );
535 }
536
537 // R3 interfaces now active
538
539 // ... and finally populate the legacy interface from the ptree data
540 ATH_CHECK( prepareTriggerMenu( m_impl->m_currentHlt,
541 m_impl->m_currentL1,
542 m_impl->m_currentHltps,
543 m_impl->m_currentL1ps,
544 m_impl->m_currentBg,
545 m_impl->m_ctpConfig,
546 m_impl->m_chainList,
547 m_impl->m_sequenceList,
548 m_impl->m_bgSet, msg() ) ); // R2 interfaces now active
549
550 return StatusCode::SUCCESS;
551 }
552
553 StatusCode xAODConfigTool::loadJsonByKey(const std::string& humanName,
554 const xAOD::TriggerMenuJsonContainer* metaContainer,
555 const uint32_t keyToCheck,
556 const xAOD::TriggerMenuJson*& ptrToSet)
557 {
558 xAOD::TriggerMenuJsonContainer::const_iterator menu_itr = metaContainer->begin();
559 xAOD::TriggerMenuJsonContainer::const_iterator menu_end = metaContainer->end();
560 for( ; menu_itr != menu_end; ++menu_itr ) {
561 // Check if this is the menu we're looking for:
562 if( keyToCheck != (*menu_itr)->key() ) continue;
563 ptrToSet = *menu_itr;
564 return StatusCode::SUCCESS;
565 }
566
567 ATH_MSG_FATAL("Couldn't find configuration for current event"
568 << ", Requested key=" << keyToCheck
569 << ", Requested menu=" << humanName);
570 return StatusCode::FAILURE;
571 }
572
574 ATH_CHECK( loadPtree("HLT Menu", m_currentHltJson, m_impl->m_currentHlt) );
576 ATH_CHECK( loadPtree("HLT Monitoring", m_currentHltmonitoringJson, m_impl->m_currentHltmonitoring) );
577 }
578 ATH_CHECK( loadPtree("L1 Menu", m_currentL1Json, m_impl->m_currentL1) );
579 ATH_CHECK( loadPtree("HLT Prescales", m_currentHltpsJson, m_impl->m_currentHltps) );
580 ATH_CHECK( loadPtree("L1 Prescales", m_currentL1psJson, m_impl->m_currentL1ps) );
581 if (m_bgJson) {
582 ATH_CHECK( loadPtree("Bunchgroups", m_currentBgJson, m_impl->m_currentBg) );
583 }
584 return StatusCode::SUCCESS;
585 }
586
587 StatusCode xAODConfigTool::loadPtree(const std::string& humanName,
589 DataStructure& dataStructure)
590 {
591 std::stringstream rawData;
592 rawData << menu->payload();
593 dataStructure.clear();
594 try {
595 boost::property_tree::ptree pt;
596 boost::property_tree::read_json(rawData, pt);
597 dataStructure.setData(std::move(pt));
598 } catch (const boost::property_tree::json_parser_error& e) {
599 ATH_MSG_FATAL("Unable to decode a JSON trigger menu metadata payload for " << humanName << " with key " << menu->key());
600 ATH_MSG_FATAL(e.what());
601 return StatusCode::FAILURE;
602 }
603 return StatusCode::SUCCESS;
604 }
605
606} // namespace TrigConf
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
Base class for Trigger configuration data and wrapper around underlying representation.
void setData(const ptree &data)
Setting the configuration data.
virtual void clear()
Clearing the configuration data.
list of all HLT chains in a trigger menu
HLT menu configuration.
Definition HLTMenu.h:21
HLT monitoring configuration.
HLT menu configuration.
list of HLT sequences
L1 board configuration.
L1 menu configuration.
Definition L1Menu.h:28
L1 menu configuration.
StatusCode beginEvent_Run2(const xAOD::TrigConfKeys *keys)
Internal call to check / load from a file with Run2 metadata.
const xAOD::TriggerMenuJson * m_currentHltmonitoringJson
virtual const BunchGroupSet * bunchGroupSet() const override
Get the LVL1 bunch group set.
std::string m_metaNameJSON_hlt
Key for the trigger configuration metadata objects (Run 3)
const xAOD::TriggerMenuContainer * m_tmc
The configuration object of the current input file (for Run2 AOD)
bool m_triggerMenuContainerAvailable
Is decoded R2 format data available?
StatusCode loadJsonByKey(const std::string &humanName, const xAOD::TriggerMenuJsonContainer *metaContainer, const uint32_t keyToCheck, const xAOD::TriggerMenuJson *&ptrToSet)
Locates a Run3 TriggerMenuJson object inside a container by key. Loads it into the m_currentXXXJson p...
StatusCode loadPtree(const std::string &humanName, const xAOD::TriggerMenuJson *menu, DataStructure &dataStructure)
Load single m_currentXXXJson serialised JSON data into ptree.
virtual const HLTMonitoring & hltMonitoring(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMonitoring ptree.
virtual const HLTMenu & hltMenu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMenu ptree.
virtual uint32_t lvl1PrescaleKey() const override
Get the LVL1 prescale key.
virtual uint32_t masterKey() const override
Get the Super Master Key.
const xAOD::TriggerMenuJson * m_currentL1Json
virtual const HLTSequenceList & sequences() const override
Get the HLT sequences.
bool m_menuJSONContainerAvailable
Is decoded R3 format data available?
const xAOD::TriggerMenuJson * m_currentHltpsJson
const xAOD::TriggerMenuJson * m_currentL1psJson
virtual ~xAODConfigTool() override
Out-of-line dtor so that we don't need to define Impl in the header.
const xAOD::TriggerMenuJson * m_currentHltJson
The active configuration for the current event (For Run3 AOD)
virtual uint32_t bunchGroupSetKey() const override
Get the LVL1 bunch group set key.
StatusCode loadPtrees()
Load all m_currentXXXJson serialised JSON data into ptrees inside m_impl.
std::string m_metaName_run2
Key for the trigger configuration metadata object (Run 2)
virtual const CTPConfig * ctpConfig() const override
Get the LVL1 trigger menu.
const xAOD::TriggerMenu * m_menu
The active configuration for the current event (For Run2 AOD)
const xAOD::TriggerMenuJsonContainer * m_l1Json
std::string m_bgkeysName
Key for the event-level bunchgroup identification object, in the codebase since R2 but only being use...
virtual const HLTPrescalesSet & hltPrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLT prescales ptree.
const xAOD::TriggerMenuJsonContainer * m_hltmonitoringJson
virtual StatusCode beginInputFile() override
Function called when a new input file is opened.
virtual StatusCode initialize() override
Function initialising the tool.
virtual const L1Menu & l1Menu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 ptree.
const xAOD::TriggerMenuJsonContainer * m_bgJson
virtual uint32_t hltPrescaleKey() const override
Get the HLT prescale key.
std::string m_eventName
Key for the event-level configuration identifier object.
virtual StatusCode beginEvent() override
Function called when a new event is loaded.
std::unique_ptr< Impl > m_impl
virtual const HLTChainList & chains() const override
Get the HLT chains.
xAODConfigTool(const std::string &name="TrigConf::xAODConfigTool")
Create a proper constructor for Athena.
const xAOD::TriggerMenuJsonContainer * m_hltpsJson
virtual const L1PrescalesSet & l1PrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 prescales ptree.
virtual const L1BunchGroupSet & l1BunchGroupSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured bunchgroup ptree.
const xAOD::TriggerMenuJsonContainer * m_hltJson
The configuration object of the current input file (for Run3 AOD)
const xAOD::TriggerMenuJson * m_currentBgJson
StatusCode beginEvent_Run3(const xAOD::TrigConfKeys *keys, const xAOD::BunchConfKey *bgKey)
Internal call to check / load from a file with Run3 metadata.
const xAOD::TriggerMenuJsonContainer * m_l1psJson
std::string m_metaNameJSON_hltmonitoring
AsgMetadataTool(const std::string &name)
Normal ASG tool constructor with a name.
MetaStorePtr_t inputMetaStore() const
Accessor for the input metadata store.
make the sidebar many part of the config
Definition hcg.cxx:552
uint32_t id() const
Get the 32-bit identifier of the bunch configuration.
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
StatusCode prepareTriggerMenu(const xAOD::TriggerMenu *menu, CTPConfig &ctpConfig, HLTChainList &chainList, HLTSequenceList &sequenceList, BunchGroupSet &bgSet, MsgStream &msg)
In order to avoid duplicating code between how the dual-use and the Athena-only code translates the x...
bool xAODKeysMatch(const xAOD::TrigConfKeys *keys, const xAOD::TriggerMenu *menu)
Since this is used in a couple of places, it seemed to make sense to put this simple code into a cent...
STL namespace.
TriggerMenuJson_v1 TriggerMenuJson
Define the latest version of the trigger menu JSON class.
BunchConfKey_v1 BunchConfKey
Declare the current version of the bunch configuration key type.
TriggerMenuJsonContainer_v1 TriggerMenuJsonContainer
TrigConfKeys_v1 TrigConfKeys
Declare the current version of the trigger configuration keys type.
HLTMenu m_currentHlt
The JSON decoded Run3 HLT menu.
CTPConfig m_ctpConfig
Note: The run 3 JSON derives objects below are used to additionally populate these objects for interf...
HLTMonitoring m_currentHltmonitoring
The JSON decoded Run3 HLT monitoring.
HLTChainList m_chainList
The "translated" HLT configuration object.
L1Menu m_currentL1
The JSON decoded Run3 L1 menu.
HLTSequenceList m_sequenceList
The "translated" HLT configuration object.
L1BunchGroupSet m_currentBg
The JSON decoded current Bunchgroup configuration.
L1PrescalesSet m_currentL1ps
The JSON decoded current L1 prescales set.
HLTPrescalesSet m_currentHltps
The JSON decoded current HLT prescales set.
BunchGroupSet m_bgSet
The "translated" bunch group set object.
MsgStream & msg
Definition testRead.cxx:32