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-2021 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
40
41namespace TrigConf {
42
55 public virtual ITrigConfigTool {
56
59
60 public:
62 xAODConfigTool( const std::string& name = "TrigConf::xAODConfigTool" );
63
65 virtual ~xAODConfigTool() override;
66
69
71 virtual StatusCode initialize() override;
72
74
77
79 virtual const CTPConfig* ctpConfig() const override ;
80
82 virtual const ThresholdConfig* thresholdConfig() const override {
83 return 0;
84 }
85
87 virtual const BunchGroupSet* bunchGroupSet() const override ;
88
90 virtual uint32_t lvl1PrescaleKey() const override ;
91
93 virtual uint32_t bunchGroupSetKey() const override;
94
96
99
101 virtual const HLTChainList& chains() const override ;
102
104 virtual const HLTSequenceList& sequences() const override ;
105
107 virtual uint32_t masterKey() const override ;
108
110 virtual uint32_t hltPrescaleKey() const override ;
111
113
116
118 virtual const HLTMenu& hltMenu(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
119
121 virtual const HLTMonitoring& hltMonitoring(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
122
124 virtual const L1Menu& l1Menu(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
125
127 virtual const HLTPrescalesSet& hltPrescalesSet(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
128
130 virtual const L1PrescalesSet& l1PrescalesSet(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
131
133 virtual const L1BunchGroupSet& l1BunchGroupSet(const EventContext& ctx = Gaudi::Hive::currentContext()) const override;
134
136
137 protected:
140
142 virtual StatusCode beginInputFile() override;
143
145 virtual StatusCode beginEvent() override;
146
148 StatusCode beginEvent_Run2(const xAOD::TrigConfKeys* keys);
149
151 StatusCode beginEvent_Run3(const xAOD::TrigConfKeys* keys, const xAOD::BunchConfKey* bgKey);
152
154
155 private:
156
159
161 StatusCode loadJsonByKey(const std::string& humanName,
162 const xAOD::TriggerMenuJsonContainer* metaContainer,
163 const uint32_t keyToCheck,
164 const xAOD::TriggerMenuJson*& ptrToSet);
165
167 StatusCode loadPtrees();
168
170 StatusCode loadPtree(const std::string& humanName,
172 DataStructure& dataStructure);
173
175
177 std::string m_eventName;
179 std::string m_bgkeysName;
181 std::string m_metaName_run2;
185 std::string m_metaNameJSON_l1;
188 std::string m_metaNameJSON_bg;
189
199
209
214
215 // A few members moved to an impl class to hide them from cling.
216 // Otherwise, we get warnings about the use of boost::multi_index
217 // in TrigConfL1Data.
218 // Cling requires that the Impl class itself be declared public.
219 public:
220 struct Impl;
221 private:
222 std::unique_ptr<Impl> m_impl;
223 }; // class xAODConfigTool
224
225} // namespace TrigConf
226
227#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 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.
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.
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
Base class for dual-use tools that provide file metadata access.
make the sidebar many part of the config
Definition hcg.cxx:552
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.