ATLAS Offline Software
Loading...
Searching...
No Matches
DecisionAccess.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef TRIGGER_DECISION_TOOL_DecisionAccess_H
8#define TRIGGER_DECISION_TOOL_DecisionAccess_H
9
10/**********************************************************************************
11 * @Project: TrigDecisionTool
12 * @Package: TrigDecisionTool
13 * @class : DecisionAccess
14 *
15 * @brief access to information about the trigger decision
16 *
17 * @author Michael Begel <michael.begel@cern.ch> - Brookhaven National Laboratory
18 * @author Nicolas Berger <Nicolas.Berger@cern.ch> - LAPP Annecy
19 * @author Tomasz Bold <Tomasz.Bold@cern.ch> - UC Irvine - AGH Krakow
20 *
21 ***********************************************************************************/
22
23
31
35
37#include <string>
38#include <sstream>
39#include <vector>
40
41namespace HLT {
42 class Chain;
43}
44namespace TrigConf {
45 class HLTChain;
47}
48
49class LVL1_ROI;
50
51namespace Trig {
52
54
55 class DecisionAccess : public virtual Logger {
56 public:
57
59 virtual ~DecisionAccess();
60
66 bool isPassed(const Trig::ChainGroup* chaingroup,
67 unsigned int condition = TrigDefs::Physics) const;
73 bool isPassed(std::string_view chain,
74 unsigned int condition) const;
75
76 bool isPassed(std::string_view chain) const;
77
83 std::vector<bool> isPassedForEach(const Trig::ChainGroup* chainGroup,
84 unsigned int condition = TrigDefs::Physics) const;
85
91 std::vector<bool> isPassedForEach(const std::string& chain,
92 unsigned int condition = TrigDefs::Physics) const;
93
111 unsigned int isPassedBits(const Trig::ChainGroup* chaingroup) const;
112 unsigned int isPassedBits(const std::string& chain) const;
113
117 std::vector<unsigned int> isPassedBitsForEach(const Trig::ChainGroup* chaingroup) const;
118 std::vector<unsigned int> isPassedBitsForEach(const std::string& chain) const;
119
120
126 char getBGCode() const;
127
132 unsigned int condition = TrigDefs::Physics) const;
133
137 FeatureContainer features(const std::string& chainName = "EF_.*",
138 unsigned int condition = TrigDefs::Physics) const;
139
142
148 template<class CONTAINER>
149 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
150 features(const Trig::FeatureRequestDescriptor& featureRequest) const;
151
162 template<class CONTAINER>
163 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
165 const unsigned int condition = TrigDefs::Physics,
166 std::string_view containerSGKey = "",
167 const unsigned int featureCollectionMode = TrigDefs::lastFeatureOfType,
168 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
169 const int restrictToLegIndex = -1) const;
170
181 template<class CONTAINER>
182 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
183 features(const std::string& chainGroupName,
184 const unsigned int condition = TrigDefs::Physics,
185 std::string_view containerSGKey = "",
186 const unsigned int featureCollectionMode = TrigDefs::lastFeatureOfType,
187 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
188 const int restrictToLegIndex = -1) const;
189
198 template<class CONTAINER, class FEATURE_CONTAINER>
199 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
202 const std::string& roiName = TrigCompositeUtils::roiString()) const;
203
212 template<class CONTAINER>
213 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
215 const TrigCompositeUtils::Decision* decisionObject,
216 const std::string& roiName = TrigCompositeUtils::roiString()) const;
217
225 template<class CONTAINER>
226 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
228 const ElementLink<TrigRoiDescriptorCollection>& matchROI) const;
229
243 template<class CONTAINER>
244 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
246 const uint32_t matchIndex,
247 const uint32_t matchKey = 0,
248 const bool isFullscan = false) const;
249
251
257 template<class T>
258 Feature<T> ancestor(const HLT::TriggerElement* te, std::string label = "") const;
259
266 template<class T>
267 std::vector<Trig::Feature<T> > ancestors(const HLT::TriggerElement* te, std::string label = "", unsigned int condition=TrigDefs::Physics, const std::string& teName = "") const;
268
269 protected:
270
271 friend class Combination;
272
273
274 private:
275
277 virtual const Trig::CacheGlobalMemory* cgm() const = 0;
278
279 // template<class T>
280 // const T* getL1RoI(const std::vector<T>& rois, unsigned int id) const;
281
282
283 //unsigned int initRoIWord(const HLT::TriggerElement* te) const;
284
285 };
286} // End of namespace
287
288#include "DecisionAccess.icc"
289
290#endif
Handle class for reading from StoreGate.
This class represents one chain of signatures, i.e.
Definition Chain.h:61
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Top level AOD object storing LVL1 RoIs.
Definition LVL1_ROI.h:43
HLT chain configuration information.
HLT trigger element configuration information.
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > features(const Trig::FeatureRequestDescriptor &featureRequest) const
Runs 3+.
std::vector< Trig::Feature< T > > ancestors(const HLT::TriggerElement *te, std::string label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
gives back features matching (by seeding relation) - will also flatten containers if necessary
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > features(const std::string &chainGroupName, const unsigned int condition=TrigDefs::Physics, std::string_view containerSGKey="", const unsigned int featureCollectionMode=TrigDefs::lastFeatureOfType, const std::string &navElementLinkKey=TrigCompositeUtils::featureString(), const int restrictToLegIndex=-1) const
Runs 3+.
unsigned int isPassedBits(const Trig::ChainGroup *chaingroup) const
Return expert-level information about the various trigger flags as a bit mask.
std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > associateToEventView(typename SG::ReadHandle< CONTAINER > &inViewContainer, const TrigCompositeUtils::LinkInfo< FEATURE_CONTAINER > linkInfo, const std::string &roiName=TrigCompositeUtils::roiString()) const
Runs 3+.
std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > associateToEventView(typename SG::ReadHandle< CONTAINER > &inViewContainer, const ElementLink< TrigRoiDescriptorCollection > &matchROI) const
Runs 3+.
char getBGCode() const
get the bunch group code bit X=1: BG X fired (X=0..7) use: bool BGXfired = BGCode & (0x1<<X)
std::vector< bool > isPassedForEach(const Trig::ChainGroup *chainGroup, unsigned int condition=TrigDefs::Physics) const
return decision for each chain in group
std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > associateToEventView(typename SG::ReadHandle< CONTAINER > &inViewContainer, const uint32_t matchIndex, const uint32_t matchKey=0, const bool isFullscan=false) const
Runs 3+.
virtual const Trig::CacheGlobalMemory * cgm() const =0
bool isPassed(const Trig::ChainGroup *chaingroup, unsigned int condition=TrigDefs::Physics) const
true if given group of chains passed
std::vector< unsigned int > isPassedBitsForEach(const Trig::ChainGroup *chaingroup) const
Return the result of isPassedBits for each chain in the group.
std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator > associateToEventView(typename SG::ReadHandle< CONTAINER > &inViewContainer, const TrigCompositeUtils::Decision *decisionObject, const std::string &roiName=TrigCompositeUtils::roiString()) const
Runs 3+.
virtual Trig::CacheGlobalMemory * cgm()=0
FeatureContainer features(const Trig::ChainGroup *group, unsigned int condition=TrigDefs::Physics) const
Runs 1, 2.
Feature< T > ancestor(const HLT::TriggerElement *te, std::string label="") const
gives back feature matching (by seeding relation)
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > features(const Trig::ChainGroup *group, const unsigned int condition=TrigDefs::Physics, std::string_view containerSGKey="", const unsigned int featureCollectionMode=TrigDefs::lastFeatureOfType, const std::string &navElementLinkKey=TrigCompositeUtils::featureString(), const int restrictToLegIndex=-1) const
Runs 3+.
is basic vehicle of object access in TDT
Definition Feature.h:112
Logger()=default
std::string label(const std::string &format, int i)
Definition label.h:19
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
xAOD::TrigComposite Decision
const std::string & roiString()
const std::string & featureString()
Forward iterator to traverse the main components of the trigger configuration.
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.
The common trigger namespace for trigger analysis tools.
Helper to keep a Decision object, ElementLink and ActiveState (with respect to some requested ChainGr...
Definition LinkInfo.h:22