CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TriggerAlgorithm.cc
Go to the documentation of this file.
1 //
2 //
3 
4 
6 
7 
8 using namespace pat;
9 
10 
11 // Constructors and Destructor
12 
13 
14 // Default constructor
16  name_(),
17  alias_(),
18  logic_(),
19  tech_(),
20  bit_(),
21  gtlResult_(),
22  prescale_(),
23  mask_(),
24  decisionBeforeMask_(),
25  decisionAfterMask_()
26 {
27  conditionKeys_.clear();
28 }
29 
30 
31 // Constructor from algorithm name only
33  name_( name ),
34  alias_(),
35  logic_(),
36  tech_(),
37  bit_(),
38  gtlResult_(),
39  prescale_(),
40  mask_(),
41  decisionBeforeMask_(),
42  decisionAfterMask_()
43 {
44  conditionKeys_.clear();
45 }
46 
47 
48 // Constructors from values
49 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
50  name_( name ),
51  alias_( alias),
52  logic_(),
53  tech_( tech ),
54  bit_( bit ),
55  gtlResult_(),
56  prescale_( prescale ),
57  mask_( mask ),
58  decisionBeforeMask_( decisionBeforeMask ),
59  decisionAfterMask_( decisionAfterMask )
60 {
61  conditionKeys_.clear();
62 }
63 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
64  name_( name ),
65  alias_( alias),
66  logic_(),
67  tech_( tech ),
68  bit_( bit ),
69  gtlResult_( gtlResult ),
70  prescale_( prescale ),
71  mask_( mask ),
72  decisionBeforeMask_( decisionBeforeMask ),
73  decisionAfterMask_( decisionAfterMask )
74 {
75  conditionKeys_.clear();
76 }
77 
78 
79 // Methods
80 
81 
82 // Checks, if a certain trigger condition collection index is assigned
83 bool TriggerAlgorithm::hasConditionKey( unsigned conditionKey ) const
84 {
85  for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) {
86  if ( conditionKeys().at( iO ) == conditionKey ) {
87  return true;
88  }
89  }
90  return false;
91 }
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.
std::vector< unsigned > conditionKeys_
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
TriggerAlgorithm()
Constructors and Destructor.