ATLAS Offline Software
Loading...
Searching...
No Matches
DecisionAccess.h
Go to the documentation of this file.
1// -*- c++ -*-
2
3/*
4 Copyright (C) 2002-2022 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#include <string>
23#include <sstream>
24#include <vector>
25
33
35
37
39
40namespace HLT {
41 class Chain;
42}
43namespace TrigConf {
44 class HLTChain;
46}
47
48class LVL1_ROI;
49
50namespace Trig {
51
53
54 class DecisionAccess : public virtual Logger {
55 public:
56
58 virtual ~DecisionAccess();
59
65 bool isPassed(const Trig::ChainGroup* chaingroup,
66 unsigned int condition = TrigDefs::Physics) const;
72 bool isPassed(const std::string& chain,
73 unsigned int condition) const;
74
75 bool isPassed(const std::string& chain) const;
76
82 std::vector<bool> isPassedForEach(const Trig::ChainGroup* chainGroup,
83 unsigned int condition = TrigDefs::Physics) const;
84
90 std::vector<bool> isPassedForEach(const std::string& chain,
91 unsigned int condition = TrigDefs::Physics) const;
92
110 unsigned int isPassedBits(const Trig::ChainGroup* chaingroup) const;
111 unsigned int isPassedBits(const std::string& chain) const;
112
116 std::vector<unsigned int> isPassedBitsForEach(const Trig::ChainGroup* chaingroup) const;
117 std::vector<unsigned int> isPassedBitsForEach(const std::string& chain) const;
118
119
125 char getBGCode() const;
126
131 unsigned int condition = TrigDefs::Physics) const;
132
136 FeatureContainer features(const std::string& chainName = "EF_.*",
137 unsigned int condition = TrigDefs::Physics) const;
138
141
147 template<class CONTAINER>
148 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
149 features(const Trig::FeatureRequestDescriptor& featureRequest) const;
150
161 template<class CONTAINER>
162 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
164 const unsigned int condition = TrigDefs::Physics,
165 const std::string& containerSGKey = "",
166 const unsigned int featureCollectionMode = TrigDefs::lastFeatureOfType,
167 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
168 const int restrictToLegIndex = -1) const;
169
180 template<class CONTAINER>
181 std::vector< TrigCompositeUtils::LinkInfo<CONTAINER> >
182 features(const std::string& chainGroupName,
183 const unsigned int condition = TrigDefs::Physics,
184 const std::string& containerSGKey = "",
185 const unsigned int featureCollectionMode = TrigDefs::lastFeatureOfType,
186 const std::string& navElementLinkKey = TrigCompositeUtils::featureString(),
187 const int restrictToLegIndex = -1) const;
188
197 template<class CONTAINER, class FEATURE_CONTAINER>
198 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
201 const std::string& roiName = TrigCompositeUtils::roiString()) const;
202
211 template<class CONTAINER>
212 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
214 const TrigCompositeUtils::Decision* decisionObject,
215 const std::string& roiName = TrigCompositeUtils::roiString()) const;
216
224 template<class CONTAINER>
225 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
227 const ElementLink<TrigRoiDescriptorCollection>& matchROI) const;
228
242 template<class CONTAINER>
243 std::pair< typename CONTAINER::const_iterator, typename CONTAINER::const_iterator >
245 const uint32_t matchIndex,
246 const uint32_t matchKey = 0,
247 const bool isFullscan = false) const;
248
250
256 template<class T>
257 Feature<T> ancestor(const HLT::TriggerElement* te, std::string label = "") const;
258
265 template<class T>
266 std::vector<Trig::Feature<T> > ancestors(const HLT::TriggerElement* te, std::string label = "", unsigned int condition=TrigDefs::Physics, const std::string& teName = "") const;
267
268 protected:
269
270 friend class Combination;
271
272
273 private:
274
276 virtual const Trig::CacheGlobalMemory* cgm() const = 0;
277
278 // template<class T>
279 // const T* getL1RoI(const std::vector<T>& rois, unsigned int id) const;
280
281
282 //unsigned int initRoIWord(const HLT::TriggerElement* te) const;
283
284 };
285} // End of namespace
286
287#include "DecisionAccess.icc"
288
289#endif
Handle class for reading from StoreGate.
This class represents one chain of signatures, i.e.
Definition Chain.h:64
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
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+.
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > features(const std::string &chainGroupName, const unsigned int condition=TrigDefs::Physics, const std::string &containerSGKey="", const unsigned int featureCollectionMode=TrigDefs::lastFeatureOfType, const std::string &navElementLinkKey=TrigCompositeUtils::featureString(), const int restrictToLegIndex=-1) 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+.
std::vector< TrigCompositeUtils::LinkInfo< CONTAINER > > features(const Trig::ChainGroup *group, const unsigned int condition=TrigDefs::Physics, const std::string &containerSGKey="", const unsigned int featureCollectionMode=TrigDefs::lastFeatureOfType, const std::string &navElementLinkKey=TrigCompositeUtils::featureString(), const int restrictToLegIndex=-1) 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)
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 ...
const std::string & roiString()
const std::string & featureString()
Forward iterator to traverse the main components of the trigger configuration.
Definition Config.h:22
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