CMS 3D CMS Logo

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_(),
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 }
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.
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.
std::string logic_
L1 algorithm logival expression.
std::vector< unsigned > conditionKeys_
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.
unsigned prescale() const
Get L1 algorithm pre-scale.
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.
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
TriggerAlgorithm()
Constructors and Destructor.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.