ATLAS Offline Software
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
21 #include "TrigConfData/HLTMenu.h"
23 #include "TrigConfData/L1Menu.h"
28 
29 // xAOD include(s):
32 
35 
38 
40 
41 namespace 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 
149 
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 
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;
183  std::string m_metaNameJSON_hlt;
185  std::string m_metaNameJSON_l1;
186  std::string m_metaNameJSON_hltps;
187  std::string m_metaNameJSON_l1ps;
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
TrigConf::BunchGroupSet
Definition: BunchGroupSet.h:19
TrigConf::ThresholdConfig
Definition: ThresholdConfig.h:17
CTPConfig.h
HLTPrescalesSet.h
TrigConf::xAODConfigTool::m_l1psJson
const xAOD::TriggerMenuJsonContainer * m_l1psJson
Definition: xAODConfigTool.h:197
HLTChainList.h
TrigConf::xAODConfigTool::m_hltpsJson
const xAOD::TriggerMenuJsonContainer * m_hltpsJson
Definition: xAODConfigTool.h:196
TrigConf::HLTMenu
HLT menu configuration.
Definition: HLTMenu.h:21
TrigConf::xAODConfigTool::beginEvent_Run3
StatusCode beginEvent_Run3(const xAOD::TrigConfKeys *keys, const xAOD::BunchConfKey *bgKey)
Internal call to check / load from a file with Run3 metadata.
Definition: xAODConfigTool.cxx:481
TriggerMenuJson.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
ITrigConfigTool.h
TrigConf::xAODConfigTool::bunchGroupSet
virtual const BunchGroupSet * bunchGroupSet() const override
Get the LVL1 bunch group set.
Definition: xAODConfigTool.cxx:125
CurrentContext.h
TrigConf::xAODConfigTool::~xAODConfigTool
virtual ~xAODConfigTool() override
Out-of-line dtor so that we don't need to define Impl in the header.
TrigConf::xAODConfigTool::m_metaNameJSON_bg
std::string m_metaNameJSON_bg
Definition: xAODConfigTool.h:188
TrigConf::xAODConfigTool::loadPtree
StatusCode loadPtree(const std::string &humanName, const xAOD::TriggerMenuJson *menu, DataStructure &dataStructure)
Load single m_currentXXXJson serialised JSON data into ptree.
Definition: xAODConfigTool.cxx:587
TrigConf::xAODConfigTool::lvl1PrescaleKey
virtual uint32_t lvl1PrescaleKey() const override
Get the LVL1 prescale key.
Definition: xAODConfigTool.cxx:136
TrigConf::xAODConfigTool::loadPtrees
StatusCode loadPtrees()
Load all m_currentXXXJson serialised JSON data into ptrees inside m_impl.
Definition: xAODConfigTool.cxx:573
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
TrigConf::xAODConfigTool::m_metaNameJSON_l1ps
std::string m_metaNameJSON_l1ps
Definition: xAODConfigTool.h:187
L1PrescalesSet.h
TrigConf::xAODConfigTool::hltPrescaleKey
virtual uint32_t hltPrescaleKey() const override
Get the HLT prescale key.
Definition: xAODConfigTool.cxx:206
TrigConf::xAODConfigTool::m_metaNameJSON_hlt
std::string m_metaNameJSON_hlt
Key for the trigger configuration metadata objects (Run 3)
Definition: xAODConfigTool.h:183
TrigConf::xAODConfigTool::thresholdConfig
virtual const ThresholdConfig * thresholdConfig() const override
Get the LVL1 threshold configuruation (not available from xAOD)
Definition: xAODConfigTool.h:82
TrigConf::xAODConfigTool::m_metaNameJSON_hltmonitoring
std::string m_metaNameJSON_hltmonitoring
Definition: xAODConfigTool.h:184
TrigConf::xAODConfigTool::loadJsonByKey
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...
Definition: xAODConfigTool.cxx:553
TrigConf::xAODConfigTool::ctpConfig
virtual const CTPConfig * ctpConfig() const override
Get the LVL1 trigger menu.
Definition: xAODConfigTool.cxx:114
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition: Config.h:22
TrigConf::xAODConfigTool::beginInputFile
virtual StatusCode beginInputFile() override
Function called when a new input file is opened.
Definition: xAODConfigTool.cxx:273
menu
make the sidebar many part of the config
Definition: hcg.cxx:551
TrigConf::xAODConfigTool::xAODConfigTool
xAODConfigTool(const std::string &name="TrigConf::xAODConfigTool")
Create a proper constructor for Athena.
Definition: xAODConfigTool.cxx:51
TrigConf::xAODConfigTool::l1Menu
virtual const L1Menu & l1Menu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 ptree.
Definition: xAODConfigTool.cxx:241
TrigConf::xAODConfigTool::m_bgkeysName
std::string m_bgkeysName
Key for the event-level bunchgroup identification object, in the codebase since R2 but only being use...
Definition: xAODConfigTool.h:179
TrigConf::HLTChainList
list of all HLT chains in a trigger menu
Definition: HLTChainList.h:56
TrigConf::xAODConfigTool::m_currentL1Json
const xAOD::TriggerMenuJson * m_currentL1Json
Definition: xAODConfigTool.h:205
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigConf::xAODConfigTool::m_currentHltJson
const xAOD::TriggerMenuJson * m_currentHltJson
The active configuration for the current event (For Run3 AOD)
Definition: xAODConfigTool.h:203
TrigConf::xAODConfigTool::m_bgJson
const xAOD::TriggerMenuJsonContainer * m_bgJson
Definition: xAODConfigTool.h:198
TrigConf::xAODConfigTool::beginEvent
virtual StatusCode beginEvent() override
Function called when a new event is loaded.
Definition: xAODConfigTool.cxx:420
TriggerMenuJsonContainer.h
TrigConf::xAODConfigTool::m_currentHltmonitoringJson
const xAOD::TriggerMenuJson * m_currentHltmonitoringJson
Definition: xAODConfigTool.h:204
TrigConf::xAODConfigTool::m_tmc
const xAOD::TriggerMenuContainer * m_tmc
The configuration object of the current input file (for Run2 AOD)
Definition: xAODConfigTool.h:191
TrigConf::L1BunchGroupSet
L1 board configuration.
Definition: L1BunchGroupSet.h:71
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
TrigConf::xAODConfigTool::m_metaName_run2
std::string m_metaName_run2
Key for the trigger configuration metadata object (Run 2)
Definition: xAODConfigTool.h:181
TrigConf::xAODConfigTool::hltMenu
virtual const HLTMenu & hltMenu(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMenu ptree.
Definition: xAODConfigTool.cxx:225
TrigConf::xAODConfigTool::m_hltmonitoringJson
const xAOD::TriggerMenuJsonContainer * m_hltmonitoringJson
Definition: xAODConfigTool.h:194
TrigConf::name
Definition: HLTChainList.h:35
TriggerMenu.h
TrigConf::L1PrescalesSet
L1 menu configuration.
Definition: L1PrescalesSet.h:19
TriggerMenuContainer.h
BunchGroupSet.h
L1BunchGroupSet.h
TrigConf::xAODConfigTool::m_currentBgJson
const xAOD::TriggerMenuJson * m_currentBgJson
Definition: xAODConfigTool.h:208
xAOD::TrigConfKeys_v1
Class describing the configuration used in a given event.
Definition: TrigConfKeys_v1.h:32
TrigConf::xAODConfigTool::l1PrescalesSet
virtual const L1PrescalesSet & l1PrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured L1 prescales ptree.
Definition: xAODConfigTool.cxx:257
TrigConf::xAODConfigTool::m_l1Json
const xAOD::TriggerMenuJsonContainer * m_l1Json
Definition: xAODConfigTool.h:195
TrigConf::DataStructure
Base class for Trigger configuration data and wrapper around underlying representation.
Definition: DataStructure.h:37
TrigConf::xAODConfigTool::sequences
virtual const HLTSequenceList & sequences() const override
Get the HLT sequences.
Definition: xAODConfigTool.cxx:176
TrigConf::xAODConfigTool::initialize
virtual StatusCode initialize() override
Function initialising the tool.
Definition: xAODConfigTool.cxx:78
xAOD::TriggerMenuJson_v1
Raw JSON data for a given type of menu file.
Definition: TriggerMenuJson_v1.h:26
TrigConf::HLTMonitoring
HLT monitoring configuration.
Definition: HLTMonitoring.h:27
TrigConf::xAODConfigTool::Impl
Definition: xAODConfigTool.cxx:25
TrigConf::xAODConfigTool::l1BunchGroupSet
virtual const L1BunchGroupSet & l1BunchGroupSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured bunchgroup ptree.
Definition: xAODConfigTool.cxx:265
TrigConf::ITrigConfigTool
Interface for dual-use tools that provide trigger configuration information.
Definition: ITrigConfigTool.h:31
TrigConf::xAODConfigTool::m_currentHltpsJson
const xAOD::TriggerMenuJson * m_currentHltpsJson
Definition: xAODConfigTool.h:206
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
TrigConf::xAODConfigTool::m_menuJSONContainerAvailable
bool m_menuJSONContainerAvailable
Is decoded R3 format data available?
Definition: xAODConfigTool.h:213
TrigConf::xAODConfigTool::m_currentL1psJson
const xAOD::TriggerMenuJson * m_currentL1psJson
Definition: xAODConfigTool.h:207
HLTSequenceList.h
TrigConf::xAODConfigTool::chains
virtual const HLTChainList & chains() const override
Get the HLT chains.
Definition: xAODConfigTool.cxx:165
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
TrigConf::xAODConfigTool::m_metaNameJSON_hltps
std::string m_metaNameJSON_hltps
Definition: xAODConfigTool.h:186
AsgMetadataTool.h
TrigConfKeys.h
TrigConf::xAODConfigTool::hltMonitoring
virtual const HLTMonitoring & hltMonitoring(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLTMonitoring ptree.
Definition: xAODConfigTool.cxx:233
TrigConf::xAODConfigTool::masterKey
virtual uint32_t masterKey() const override
Get the Super Master Key.
Definition: xAODConfigTool.cxx:187
TrigConf::CTPConfig
Definition: CTPConfig.h:27
TrigConf::xAODConfigTool::hltPrescalesSet
virtual const HLTPrescalesSet & hltPrescalesSet(const EventContext &ctx=Gaudi::Hive::currentContext()) const override
Returns the JSON configured HLT prescales ptree.
Definition: xAODConfigTool.cxx:249
TrigConf::xAODConfigTool::m_menu
const xAOD::TriggerMenu * m_menu
The active configuration for the current event (For Run2 AOD)
Definition: xAODConfigTool.h:201
HLTMenu.h
BunchConfKey.h
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
TrigConf::xAODConfigTool::m_eventName
std::string m_eventName
Key for the event-level configuration identifier object.
Definition: xAODConfigTool.h:177
TrigConf::xAODConfigTool::m_hltJson
const xAOD::TriggerMenuJsonContainer * m_hltJson
The configuration object of the current input file (for Run3 AOD)
Definition: xAODConfigTool.h:193
TrigConf::xAODConfigTool::m_impl
std::unique_ptr< Impl > m_impl
Definition: xAODConfigTool.h:220
L1Menu.h
TrigConf::xAODConfigTool::m_triggerMenuContainerAvailable
bool m_triggerMenuContainerAvailable
Is decoded R2 format data available?
Definition: xAODConfigTool.h:211
TrigConf::HLTPrescalesSet
HLT menu configuration.
Definition: HLTPrescalesSet.h:19
DataStructure.h
xAOD::TriggerMenu_v1
Class holding one particular trigger configuration.
Definition: TriggerMenu_v1.h:34
TrigConf::xAODConfigTool::beginEvent_Run2
StatusCode beginEvent_Run2(const xAOD::TrigConfKeys *keys)
Internal call to check / load from a file with Run2 metadata.
Definition: xAODConfigTool.cxx:451
TrigConf::xAODConfigTool::m_metaNameJSON_l1
std::string m_metaNameJSON_l1
Definition: xAODConfigTool.h:185
TrigConf::xAODConfigTool::bunchGroupSetKey
virtual uint32_t bunchGroupSetKey() const override
Get the LVL1 bunch group set key.
Definition: xAODConfigTool.cxx:155
xAOD::BunchConfKey_v1
Class identifying the bunch configuration of a given event.
Definition: BunchConfKey_v1.h:29
HLTMonitoring.h
TrigConf::HLTSequenceList
list of HLT sequences
Definition: HLTSequenceList.h:40
TrigConf::xAODConfigTool
Trigger configuration metadata tool for xAOD analysis.
Definition: xAODConfigTool.h:55