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_(),
35  decisionBeforeMask_(),
36  decisionAfterMask_() {
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 }
Definition: HeavyIon.h:7
std::vector< unsigned > conditionKeys_
TriggerAlgorithm()
Constructors and Destructor.
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.