ATLAS Offline Software
Loading...
Searching...
No Matches
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
40bool 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
48bool Trig::DecisionAccess::isPassed(const std::string& chain) const {
49 return isPassed(chain, TrigDefs::Physics);
50}
51
52std::vector<bool>
54 unsigned int condition) const
55{
56 return chainGroup->isPassedForEach(condition);
57}
58
59std::vector<bool>
61 unsigned int condition) const
62{
63 const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
64 return g->isPassedForEach(condition);
66
67unsigned int Trig::DecisionAccess::isPassedBits(const Trig::ChainGroup* chainGroup) const
68{
69 return chainGroup->isPassedBits();
70}
71
72unsigned 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
78std::vector<unsigned int>
80{
81 return chainGroup->isPassedBitsForEach();
82}
83
84std::vector<unsigned int>
85Trig::DecisionAccess::isPassedBitsForEach(const std::string& chain) const
86{
87 const Trig::ChainGroup *g = cgm()->createChainGroup(Trig::convertStringToVector(chain));
88 return g->isPassedBitsForEach();
89}
90
92Trig::DecisionAccess::features(const Trig::ChainGroup* chain, unsigned int condition) const {
93 return chain->features(condition);
94}
95
97Trig::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
102char
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}
#define ATH_MSG_ERROR(x)
unsigned int isPassedBits() const
returns bits (OR ed) of the chain group Meaning of the returned bits can be understood by using masks...
std::vector< bool > isPassedForEach(unsigned int condition=TrigDefs::Physics) const
return vector with isPassed decision for each chain
bool isPassed(unsigned int condition=TrigDefs::Physics) const
tells if chain group passed
std::vector< unsigned int > isPassedBitsForEach() const
return result of isPassedBits for each chain in the group
unsigned int isPassedBits(const Trig::ChainGroup *chaingroup) const
Return expert-level information about the various trigger flags as a bit mask.
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
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.
virtual Trig::CacheGlobalMemory * cgm()=0
FeatureContainer features(const Trig::ChainGroup *group, unsigned int condition=TrigDefs::Physics) const
Runs 1, 2.
virtual Trig::CacheGlobalMemory * cgm()
unsigned int isPassedBits(const Trig::ChainGroup *chaingroup) const
Return expert-level information about the various trigger flags as a bit mask.
std::vector< std::string > convertStringToVector(const std::string &triggerNames)
makes a split of list of chains into the vector of chains