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 // $Id: TriggerAlgorithm.cc,v 1.2 2010/12/16 18:39:17 vadler Exp $
3 //
4 
5 
7 
8 
9 using namespace pat;
10 
11 
12 // Constructors and Destructor
13 
14 
15 // Default constructor
17  name_(),
18  alias_(),
19  logic_(),
20  tech_(),
21  bit_(),
22  prescale_(),
23  mask_(),
24  decisionBeforeMask_(),
25  decisionAfterMask_()
26 {
27  conditionKeys_.clear();
28 }
29 
30 
31 // Constructor from algorithm name only
32 TriggerAlgorithm::TriggerAlgorithm( const std::string & name ) :
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 }
std::vector< unsigned > conditionKeys_
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
TriggerAlgorithm()
Constructors and Destructor.
std::vector< unsigned > conditionKeys() const
Get all trigger condition collection indeces.