CMS 3D CMS Logo

TriggerAlgorithm.h
Go to the documentation of this file.
1 #ifndef DataFormats_PatCandidates_TriggerAlgorithm_h
2 #define DataFormats_PatCandidates_TriggerAlgorithm_h
3 
4 // -*- C++ -*-
5 //
6 // Package: PatCandidates
7 // Class: pat::TriggerAlgorithm
8 //
9 //
21 #include <string>
22 #include <vector>
23 
28 
29 namespace pat {
30 
33 
41  bool tech_;
43  unsigned bit_;
45  bool gtlResult_;
47  unsigned prescale_;
49  bool mask_;
56  std::vector<unsigned> conditionKeys_;
57 
58  public:
60 
67  const std::string& alias,
68  bool tech,
69  unsigned bit,
70  unsigned prescale,
71  bool mask,
72  bool decisionBeforeMask,
73  bool decisionAfterMask); // for backward compatibility
75  const std::string& alias,
76  bool tech,
77  unsigned bit,
78  bool gtlResult,
79  unsigned prescale,
80  bool mask,
81  bool decisionBeforeMask,
82  bool decisionAfterMask);
83 
85  virtual ~TriggerAlgorithm(){};
86 
88 
90  void setName(const std::string& name) { name_ = name; };
92  void setAlias(const std::string& alias) { alias_ = alias; };
94  void setLogicalExpression(const std::string& expression) { logic_ = expression; };
96  void setTechTrigger(bool tech) { tech_ = tech; };
98  void setBit(unsigned bit) { bit_ = bit; };
102  void setPrescale(unsigned prescale) { prescale_ = prescale; };
104  void setMask(bool mask) { mask_ = mask; };
110  void addConditionKey(unsigned conditionKey) {
111  if (!hasConditionKey(conditionKey))
112  conditionKeys_.push_back(conditionKey);
113  };
115  const std::string& name() const { return name_; };
117  const std::string& alias() const { return alias_; };
119  const std::string& logicalExpression() const { return logic_; };
121  bool techTrigger() const { return tech_; };
123  unsigned bit() const { return bit_; };
125  bool gtlResult() const { return gtlResult_; };
127  unsigned prescale() const { return prescale_; };
129  bool mask() const { return mask_; };
131  bool decisionBeforeMask() const { return decisionBeforeMask_; };
133  bool decisionAfterMask() const { return decisionAfterMask_; };
136  bool decision() const { return decisionAfterMask(); };
138  const std::vector<unsigned>& conditionKeys() const { return conditionKeys_; };
140  bool hasConditionKey(unsigned conditionKey) const;
141  };
142 
144  typedef std::vector<TriggerAlgorithm> TriggerAlgorithmCollection;
153 
154 } // namespace pat
155 
156 #endif
edm::RefProd< TriggerAlgorithmCollection >
pat::TriggerAlgorithm::TriggerAlgorithm
TriggerAlgorithm()
Constructors and Destructor.
Definition: TriggerAlgorithm.cc:11
pat::TriggerAlgorithmRefVectorIterator
edm::RefVectorIterator< TriggerAlgorithmCollection > TriggerAlgorithmRefVectorIterator
Const iterator over vector of persistent references to items in the same TriggerAlgorithmCollection.
Definition: TriggerAlgorithm.h:152
pat::TriggerAlgorithm::decisionAfterMask_
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
Definition: TriggerAlgorithm.h:53
RefProd.h
pat::TriggerAlgorithmRefProd
edm::RefProd< TriggerAlgorithmCollection > TriggerAlgorithmRefProd
Persistent reference to a TriggerAlgorithmCollection product.
Definition: TriggerAlgorithm.h:148
pat::TriggerAlgorithm::prescale
unsigned prescale() const
Get L1 algorithm pre-scale.
Definition: TriggerAlgorithm.h:127
pat::TriggerAlgorithm::setGtlResult
void setGtlResult(bool gtlResult)
Set L1 algorithm GTL result.
Definition: TriggerAlgorithm.h:100
pat::TriggerAlgorithm::logic_
std::string logic_
L1 algorithm logival expression.
Definition: TriggerAlgorithm.h:39
pat::TriggerAlgorithm::tech_
bool tech_
Flag for technical L1 algorithms.
Definition: TriggerAlgorithm.h:41
pat::TriggerAlgorithm::conditionKeys
const std::vector< unsigned > & conditionKeys() const
Get all trigger condition collection indeces.
Definition: TriggerAlgorithm.h:138
RefVectorIterator.h
edm::RefVector
Definition: EDProductfwd.h:27
pat::TriggerAlgorithm::setBit
void setBit(unsigned bit)
Set L1 algorithm bit number.
Definition: TriggerAlgorithm.h:98
pat::TriggerAlgorithm::name_
std::string name_
Data Members.
Definition: TriggerAlgorithm.h:35
edm::Ref
Definition: AssociativeIterator.h:58
pat::TriggerAlgorithm::gtlResult
bool gtlResult() const
Get L1 algorithm GTL result.
Definition: TriggerAlgorithm.h:125
pat::TriggerAlgorithm
Analysis-level L1 trigger algorithm class.
Definition: TriggerAlgorithm.h:31
pat::TriggerAlgorithm::bit_
unsigned bit_
L1 algorithm bit number.
Definition: TriggerAlgorithm.h:43
pat::TriggerAlgorithm::~TriggerAlgorithm
virtual ~TriggerAlgorithm()
Destructor.
Definition: TriggerAlgorithm.h:85
pat::TriggerAlgorithm::setDecisionBeforeMask
void setDecisionBeforeMask(bool decisionBeforeMask)
Set L1 algorithm decision, not considering the mask.
Definition: TriggerAlgorithm.h:106
pat::TriggerAlgorithm::setMask
void setMask(bool mask)
Set L1 algorithm mask.
Definition: TriggerAlgorithm.h:104
pat::TriggerAlgorithm::logicalExpression
const std::string & logicalExpression() const
Get L1 algorithm logical expression.
Definition: TriggerAlgorithm.h:119
pat::TriggerAlgorithm::techTrigger
bool techTrigger() const
Get flag for technical L1 algorithms.
Definition: TriggerAlgorithm.h:121
pat::TriggerAlgorithm::bit
unsigned bit() const
Get L1 algorithm bit number.
Definition: TriggerAlgorithm.h:123
pat::TriggerAlgorithm::alias
const std::string & alias() const
Get L1 algorithm alias.
Definition: TriggerAlgorithm.h:117
pat::TriggerAlgorithm::alias_
std::string alias_
L1 algorithm alias.
Definition: TriggerAlgorithm.h:37
pat::TriggerAlgorithm::setPrescale
void setPrescale(unsigned prescale)
Set L1 algorithm pre-scale.
Definition: TriggerAlgorithm.h:102
pat::TriggerAlgorithm::prescale_
unsigned prescale_
L1 algorithm pre-scale.
Definition: TriggerAlgorithm.h:47
RefVector.h
pat::TriggerAlgorithm::mask_
bool mask_
L1 algorithm mask.
Definition: TriggerAlgorithm.h:49
pat::TriggerAlgorithm::mask
bool mask() const
Get L1 algorithm mask.
Definition: TriggerAlgorithm.h:129
pat::TriggerAlgorithm::setDecisionAfterMas
void setDecisionAfterMas(bool decisionAfterMask)
Set L1 algorithm decision, considering the mask.
Definition: TriggerAlgorithm.h:108
pat::TriggerAlgorithmRef
edm::Ref< TriggerAlgorithmCollection > TriggerAlgorithmRef
Persistent reference to an item in a TriggerAlgorithmCollection.
Definition: TriggerAlgorithm.h:146
pat
Definition: HeavyIon.h:7
pat::TriggerAlgorithmCollection
std::vector< TriggerAlgorithm > TriggerAlgorithmCollection
Collection of TriggerAlgorithm.
Definition: TriggerAlgorithm.h:144
prescale
Definition: PrescaleEventFilter.cc:32
pat::TriggerAlgorithmRefVector
edm::RefVector< TriggerAlgorithmCollection > TriggerAlgorithmRefVector
Vector of persistent references to items in the same TriggerAlgorithmCollection.
Definition: TriggerAlgorithm.h:150
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
pat::TriggerAlgorithm::addConditionKey
void addConditionKey(unsigned conditionKey)
Add a new trigger condition collection index.
Definition: TriggerAlgorithm.h:110
pat::TriggerAlgorithm::setLogicalExpression
void setLogicalExpression(const std::string &expression)
Set L1 algorithm logical expression.
Definition: TriggerAlgorithm.h:94
pat::TriggerAlgorithm::conditionKeys_
std::vector< unsigned > conditionKeys_
Definition: TriggerAlgorithm.h:56
pat::TriggerAlgorithm::decision
bool decision() const
Definition: TriggerAlgorithm.h:136
Ref.h
pat::TriggerAlgorithm::setName
void setName(const std::string &name)
Methods.
Definition: TriggerAlgorithm.h:90
edm::RefVectorIterator
Definition: EDProductfwd.h:33
pat::TriggerAlgorithm::setTechTrigger
void setTechTrigger(bool tech)
Set flag for technical L1 algorithms.
Definition: TriggerAlgorithm.h:96
pat::TriggerAlgorithm::decisionBeforeMask
bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.
Definition: TriggerAlgorithm.h:131
pat::TriggerAlgorithm::decisionBeforeMask_
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
Definition: TriggerAlgorithm.h:51
pat::TriggerAlgorithm::name
const std::string & name() const
Get L1 algorithm name.
Definition: TriggerAlgorithm.h:115
pat::TriggerAlgorithm::setAlias
void setAlias(const std::string &alias)
Set L1 algorithm alias.
Definition: TriggerAlgorithm.h:92
pat::TriggerAlgorithm::hasConditionKey
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
Definition: TriggerAlgorithm.cc:86
pat::TriggerAlgorithm::decisionAfterMask
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
Definition: TriggerAlgorithm.h:133
pat::TriggerAlgorithm::gtlResult_
bool gtlResult_
L1 algorithm result as determined on the GTL board.
Definition: TriggerAlgorithm.h:45