ATLAS Offline Software
Loading...
Searching...
No Matches
xAODConfigTool.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGCONFXAOD_XAODCONFIGTOOL_H
8#define TRIGCONFXAOD_XAODCONFIGTOOL_H
9
10// Infrastructure include(s):
12
13// Trigger configuration include(s):
14// Run 2 / legacy structures
20// Run 3 structures
23#include "TrigConfData/L1Menu.h"
28
29// xAOD include(s):
32
35
38
39
40namespace TrigConf {
41
51 public virtual ITrigConfigTool {
52
55
56 public:
58 xAODConfigTool( const std::string& name = "TrigConf::xAODConfigTool" );
59
61 virtual ~xAODConfigTool() override;
62
65
67 virtual StatusCode initialize() override;
68
70
73
75 virtual const CTPConfig* ctpConfig() const override ;
76
78 virtual const ThresholdConfig* thresholdConfig() const override {
79 return 0;
80 }
81
83 virtual const BunchGroupSet* bunchGroupSet() const override ;
84
86 virtual uint32_t lvl1PrescaleKey() const override ;
87
89 virtual uint32_t bunchGroupSetKey() const override;
90
92
95
97 virtual const HLTChainList& chains() const override ;
98
100 virtual const HLTSequenceList& sequences() const override ;
101
103 virtual uint32_t masterKey() const override ;
104
106 virtual uint32_t hltPrescaleKey() const override ;
107
109
112
114 virtual const HLTMenu& hltMenu(const EventContext& ctx) const override;
115
117 virtual const HLTMonitoring& hltMonitoring(const EventContext& ctx) const override;
118
120 virtual const L1Menu& l1Menu(const EventContext& ctx) const override;
121
123 virtual const HLTPrescalesSet& hltPrescalesSet(const EventContext& ctx) const override;
124
126 virtual const L1PrescalesSet& l1PrescalesSet(const EventContext& ctx) const override;
127
129 virtual const L1BunchGroupSet& l1BunchGroupSet(const EventContext& ctx) const override;
130
132
133 protected:
136
138 virtual StatusCode beginInputFile() override;
139
141 virtual StatusCode beginEvent() override;
142
144 StatusCode beginEvent_Run2(const xAOD::TrigConfKeys* keys);
145
147 StatusCode beginEvent_Run3(const xAOD::TrigConfKeys* keys, const xAOD::BunchConfKey* bgKey);
148
150
151 private:
152
155
157 StatusCode loadJsonByKey(const std::string& humanName,
158 const xAOD::TriggerMenuJsonContainer* metaContainer,
159 const uint32_t keyToCheck,
160 const xAOD::TriggerMenuJson*& ptrToSet);
161
163 StatusCode loadPtrees();
164
166 StatusCode loadPtree(const std::string& humanName,
168 DataStructure& dataStructure);
169
171
173 std::string m_eventName;
175 std::string m_bgkeysName;
177 std::string m_metaName_run2;
181 std::string m_metaNameJSON_l1;
184 std::string m_metaNameJSON_bg;
185
195
205
210
211 // A few members moved to an impl class to hide them from cling.
212 // Otherwise, we get warnings about the use of boost::multi_index
213 // in TrigConfL1Data.
214 // Cling requires that the Impl class itself be declared public.
215 public:
216 struct Impl;
217 private:
218 std::unique_ptr<Impl> m_impl;
219 }; // class xAODConfigTool
220
221} // namespace TrigConf
222
223#endif // TRIGCONFXAOD_XAODCONFIGTOOL_H
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Base class for Trigger configuration data and wrapper around underlying representation.
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
Interface for dual-use tools that provide trigger configuration information.
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 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 L1BunchGroupSet & l1BunchGroupSet(const EventContext &ctx) const override
Returns the JSON configured bunchgroup ptree.
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.
virtual const ThresholdConfig * thresholdConfig() const override
Get the LVL1 threshold configuruation (not available from xAOD).
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.
virtual const L1Menu & l1Menu(const EventContext &ctx) const override
Returns the JSON configured L1 ptree.
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.
virtual const L1PrescalesSet & l1PrescalesSet(const EventContext &ctx) const override
Returns the JSON configured L1 prescales ptree.
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...
const xAOD::TriggerMenuJsonContainer * m_hltmonitoringJson
virtual StatusCode beginInputFile() override
Function called when a new input file is opened.
virtual const HLTMonitoring & hltMonitoring(const EventContext &ctx) const override
Returns the JSON configured HLTMonitoring ptree.
virtual StatusCode initialize() override
Function initialising the tool.
virtual const HLTPrescalesSet & hltPrescalesSet(const EventContext &ctx) const override
Returns the JSON configured HLT prescales ptree.
virtual const HLTMenu & hltMenu(const EventContext &ctx) const override
Returns the JSON configured HLTMenu 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
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
Base class for dual-use tools that provide file metadata access.
make the sidebar many part of the config
Definition hcg.cxx:554
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
TriggerMenuJson_v1 TriggerMenuJson
Define the latest version of the trigger menu JSON class.
TriggerMenu_v1 TriggerMenu
Define the latest version of the trigger menu class.
Definition TriggerMenu.h:16
TriggerMenuContainer_v1 TriggerMenuContainer
Define the latest version of the trigger menu container 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.