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.4 2011/11/30 13:41:14 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  gtlResult_(),
23  prescale_(),
24  mask_(),
25  decisionBeforeMask_(),
26  decisionAfterMask_()
27 {
28  conditionKeys_.clear();
29 }
30 
31 
32 // Constructor from algorithm name only
33 TriggerAlgorithm::TriggerAlgorithm( const std::string & name ) :
34  name_( name ),
35  alias_(),
36  logic_(),
37  tech_(),
38  bit_(),
39  gtlResult_(),
40  prescale_(),
41  mask_(),
42  decisionBeforeMask_(),
43  decisionAfterMask_()
44 {
45  conditionKeys_.clear();
46 }
47 
48 
49 // Constructors from values
50 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
51  name_( name ),
52  alias_( alias),
53  logic_(),
54  tech_( tech ),
55  bit_( bit ),
56  gtlResult_(),
57  prescale_( prescale ),
58  mask_( mask ),
59  decisionBeforeMask_( decisionBeforeMask ),
60  decisionAfterMask_( decisionAfterMask )
61 {
62  conditionKeys_.clear();
63 }
64 TriggerAlgorithm::TriggerAlgorithm( const std::string & name, const std::string & alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask ) :
65  name_( name ),
66  alias_( alias),
67  logic_(),
68  tech_( tech ),
69  bit_( bit ),
70  gtlResult_( gtlResult ),
71  prescale_( prescale ),
72  mask_( mask ),
73  decisionBeforeMask_( decisionBeforeMask ),
74  decisionAfterMask_( decisionAfterMask )
75 {
76  conditionKeys_.clear();
77 }
78 
79 
80 // Methods
81 
82 
83 // Checks, if a certain trigger condition collection index is assigned
84 bool TriggerAlgorithm::hasConditionKey( unsigned conditionKey ) const
85 {
86  for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) {
87  if ( conditionKeys().at( iO ) == conditionKey ) {
88  return true;
89  }
90  }
91  return false;
92 }
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.