ATLAS Offline Software
DecisionAccess.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**********************************************************************************
6  * @Project: TrigDecisionTool
7  * @Package: TrigDecisionTool
8  * @Class : DecisionAnalysis
9  *
10  * @brief access to information about the trigger decision
11  *
12  * @author Michael Begel <michael.begel@cern.ch> - Brookhaven National Laboratory
13  * @author Nicolas Berger <Nicolas.Berger@cern.ch> - LAPP Annecy
14  *
15  ***********************************************************************************/
16 
17 #include <vector>
18 #include <exception>
20 
24 
27 
28 
30 
32 
33 
35  unsigned int condition) const
36 {
37  return chainGroup->isPassed(condition);
38 }
39 
40 bool Trig::DecisionAccess::isPassed(const std::string& chain,
41  unsigned int condition ) const
42 
43 {
44  const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
45  return isPassed(g,condition);
46 }
47 
48 bool Trig::DecisionAccess::isPassed(const std::string& chain) const {
49  return isPassed(chain, TrigDefs::Physics);
50 }
51 
52 std::vector<bool>
54  unsigned int condition) const
55 {
56  return chainGroup->isPassedForEach(condition);
57 }
58 
59 std::vector<bool>
61  unsigned int condition) const
62 {
63  const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
64  return g->isPassedForEach(condition);
65 }
66 
67 unsigned int Trig::DecisionAccess::isPassedBits(const Trig::ChainGroup* chainGroup) const
68 {
69  return chainGroup->isPassedBits();
70 }
71 
72 unsigned int Trig::DecisionAccess::isPassedBits(const std::string& chain) const
73 {
74  const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
75  return isPassedBits(g);
76 }
77 
78 std::vector<unsigned int>
80 {
81  return chainGroup->isPassedBitsForEach();
82 }
83 
84 std::vector<unsigned int>
86 {
87  const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
88  return g->isPassedBitsForEach();
89 }
90 
93  return chain->features(condition);
94 }
95 
97 Trig::DecisionAccess::features(const std::string& chain, unsigned int condition) const {
98  const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
99  return features(g,condition);
100 }
101 
102 char
104  if( ! cgm()->assert_decision() ) {
105  ATH_MSG_ERROR("Something went wrong in decoding the trigger decision");
106  return 0;
107  }
108  return cgm()->m_bgCode;
109 }
110 
Trig::ChainGroup::isPassedBitsForEach
std::vector< unsigned int > isPassedBitsForEach() const
return result of isPassedBits for each chain in the group
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:261
Trig::DecisionAccess::isPassedBitsForEach
std::vector< unsigned int > isPassedBitsForEach(const Trig::ChainGroup *chaingroup) const
Return the result of isPassedBits for each chain in the group.
Definition: DecisionAccess.cxx:79
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
Trig::DecisionAccess::getBGCode
char getBGCode() const
get the bunch group code bit X=1: BG X fired (X=0..7) use: bool BGXfired = BGCode & (0x1<<X)
Definition: DecisionAccess.cxx:103
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
DecisionAccess.h
TDTUtilities.h
Trig::DecisionAccess::isPassed
bool isPassed(const Trig::ChainGroup *chaingroup, unsigned int condition=TrigDefs::Physics) const
true if given group of chains passed
Definition: DecisionAccess.cxx:34
Trig::convertStringToVector
std::vector< std::string > convertStringToVector(const std::string &triggerNames)
makes a split of list of chains into the vector of chains
Definition: TDTUtilities.cxx:41
Trig::FeatureContainer
Definition: FeatureContainer.h:54
CacheGlobalMemory.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
Trig::DecisionAccess::~DecisionAccess
virtual ~DecisionAccess()
Definition: DecisionAccess.cxx:31
Trig::DecisionAccess::features
FeatureContainer features(const Trig::ChainGroup *group, unsigned int condition=TrigDefs::Physics) const
Runs 1, 2.
Definition: DecisionAccess.cxx:92
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
HLTSignature.h
Chain.h
Trig::ChainGroup
Definition: Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/ChainGroup.h:51
Trig::ChainGroup::isPassed
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:208
HLTTriggerElement.h
Trig::DecisionAccess::isPassedBits
unsigned int isPassedBits(const Trig::ChainGroup *chaingroup) const
Return expert-level information about the various trigger flags as a bit mask.
Definition: DecisionAccess.cxx:67
Trig::ChainGroup::isPassedBits
unsigned int isPassedBits() const
returns bits (OR ed) of the chain group Meaning of the returned bits can be understood by using masks...
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:305
Trig::DecisionAccess::DecisionAccess
DecisionAccess()
Definition: DecisionAccess.cxx:29
Trig::ChainGroup::isPassedForEach
std::vector< bool > isPassedForEach(unsigned int condition=TrigDefs::Physics) const
return vector with isPassed decision for each chain
Definition: Trigger/TrigAnalysis/TrigDecisionTool/Root/ChainGroup.cxx:193
Trig::DecisionAccess::isPassedForEach
std::vector< bool > isPassedForEach(const Trig::ChainGroup *chainGroup, unsigned int condition=TrigDefs::Physics) const
return decision for each chain in group
Definition: DecisionAccess.cxx:53