CMS 3D CMS Logo

TriggerAlgorithm.cc
Go to the documentation of this file.
1 //
2 //
3 
5 
6 using namespace pat;
7 
8 // Constructors and Destructor
9 
10 // Default constructor
12  : name_(),
13  alias_(),
14  logic_(),
15  tech_(),
16  bit_(),
17  gtlResult_(),
18  prescale_(),
19  mask_(),
20  decisionBeforeMask_(),
21  decisionAfterMask_() {
22  conditionKeys_.clear();
23 }
24 
25 // Constructor from algorithm name only
27  : name_(name),
28  alias_(),
29  logic_(),
30  tech_(),
31  bit_(),
32  gtlResult_(),
33  prescale_(),
34  mask_(),
37  conditionKeys_.clear();
38 }
39 
40 // Constructors from values
42  const std::string& alias,
43  bool tech,
44  unsigned bit,
45  unsigned prescale,
46  bool mask,
47  bool decisionBeforeMask,
48  bool decisionAfterMask)
49  : name_(name),
50  alias_(alias),
51  logic_(),
52  tech_(tech),
53  bit_(bit),
54  gtlResult_(),
55  prescale_(prescale),
56  mask_(mask),
57  decisionBeforeMask_(decisionBeforeMask),
58  decisionAfterMask_(decisionAfterMask) {
59  conditionKeys_.clear();
60 }
62  const std::string& alias,
63  bool tech,
64  unsigned bit,
65  bool gtlResult,
66  unsigned prescale,
67  bool mask,
68  bool decisionBeforeMask,
69  bool decisionAfterMask)
70  : name_(name),
71  alias_(alias),
72  logic_(),
73  tech_(tech),
74  bit_(bit),
75  gtlResult_(gtlResult),
76  prescale_(prescale),
77  mask_(mask),
78  decisionBeforeMask_(decisionBeforeMask),
79  decisionAfterMask_(decisionAfterMask) {
80  conditionKeys_.clear();
81 }
82 
83 // Methods
84 
85 // Checks, if a certain trigger condition collection index is assigned
86 bool TriggerAlgorithm::hasConditionKey(unsigned conditionKey) const {
87  for (size_t iO = 0; iO < conditionKeys().size(); ++iO) {
88  if (conditionKeys().at(iO) == conditionKey) {
89  return true;
90  }
91  }
92  return false;
93 }
bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.
bool mask() const
Get L1 algorithm mask.
const std::string & alias() const
Get L1 algorithm alias.
bool gtlResult_
L1 algorithm result as determined on the GTL board.
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
std::string logic_
L1 algorithm logival expression.
std::string name_
Data Members.
unsigned bit_
L1 algorithm bit number.
bool tech_
Flag for technical L1 algorithms.
Definition: HeavyIon.h:7
std::string alias_
L1 algorithm alias.
bool gtlResult() const
Get L1 algorithm GTL result.
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
const std::string & name() const
Get L1 algorithm name.
bool mask_
L1 algorithm mask.
unsigned bit() const
Get L1 algorithm bit number.
std::vector< unsigned > conditionKeys_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.
unsigned prescale_
L1 algorithm pre-scale.
TriggerAlgorithm()
Constructors and Destructor.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.