CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
pat::TriggerAlgorithm Class Reference

Analysis-level L1 trigger algorithm class. More...

#include "DataFormats/PatCandidates/interface/TriggerAlgorithm.h"

Public Member Functions

void addConditionKey (unsigned conditionKey)
 Add a new trigger condition collection index. More...
 
const std::string & alias () const
 Get L1 algorithm alias. More...
 
unsigned bit () const
 Get L1 algorithm bit number. More...
 
const std::vector< unsigned > & conditionKeys () const
 Get all trigger condition collection indeces. More...
 
bool decision () const
 
bool decisionAfterMask () const
 Get L1 algorithm decision, considering the mask. More...
 
bool decisionBeforeMask () const
 Get L1 algorithm decision, not considering the mask. More...
 
bool gtlResult () const
 Get L1 algorithm GTL result. More...
 
bool hasConditionKey (unsigned conditionKey) const
 Checks, if a certain trigger condition collection index is assigned. More...
 
const std::string & logicalExpression () const
 Get L1 algorithm logical expression. More...
 
bool mask () const
 Get L1 algorithm mask. More...
 
const std::string & name () const
 Get L1 algorithm name. More...
 
unsigned prescale () const
 Get L1 algorithm pre-scale. More...
 
void setAlias (const std::string &alias)
 Set L1 algorithm alias. More...
 
void setBit (unsigned bit)
 Set L1 algorithm bit number. More...
 
void setDecisionAfterMas (bool decisionAfterMask)
 Set L1 algorithm decision, considering the mask. More...
 
void setDecisionBeforeMask (bool decisionBeforeMask)
 Set L1 algorithm decision, not considering the mask. More...
 
void setGtlResult (bool gtlResult)
 Set L1 algorithm GTL result. More...
 
void setLogicalExpression (const std::string &expression)
 Set L1 algorithm logical expression. More...
 
void setMask (bool mask)
 Set L1 algorithm mask. More...
 
void setName (const std::string &name)
 Methods. More...
 
void setPrescale (unsigned prescale)
 Set L1 algorithm pre-scale. More...
 
void setTechTrigger (bool tech)
 Set flag for technical L1 algorithms. More...
 
bool techTrigger () const
 Get flag for technical L1 algorithms. More...
 
 TriggerAlgorithm ()
 Constructors and Destructor. More...
 
 TriggerAlgorithm (const std::string &name)
 Constructor from algorithm name only. More...
 
 TriggerAlgorithm (const std::string &name, const std::string &alias, bool tech, unsigned bit, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask)
 Constructors from values. More...
 
 TriggerAlgorithm (const std::string &name, const std::string &alias, bool tech, unsigned bit, bool gtlResult, unsigned prescale, bool mask, bool decisionBeforeMask, bool decisionAfterMask)
 
virtual ~TriggerAlgorithm ()
 Destructor. More...
 

Private Attributes

std::string alias_
 L1 algorithm alias. More...
 
unsigned bit_
 L1 algorithm bit number. More...
 
std::vector< unsigned > conditionKeys_
 
bool decisionAfterMask_
 L1 algorithm decision, considering the mask. More...
 
bool decisionBeforeMask_
 L1 algorithm decision, not considering the mask. More...
 
bool gtlResult_
 L1 algorithm result as determined on the GTL board. More...
 
std::string logic_
 L1 algorithm logival expression. More...
 
bool mask_
 L1 algorithm mask. More...
 
std::string name_
 Data Members. More...
 
unsigned prescale_
 L1 algorithm pre-scale. More...
 
bool tech_
 Flag for technical L1 algorithms. More...
 

Detailed Description

Analysis-level L1 trigger algorithm class.

TriggerAlgorithm implements a container for L1 trigger algorithms' information within the 'pat' namespace. For detailed information, consult https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#TriggerAlgorithm

Author
Volker Adler

Definition at line 34 of file TriggerAlgorithm.h.

Constructor & Destructor Documentation

TriggerAlgorithm::TriggerAlgorithm ( )

Constructors and Destructor.

Default constructor

Definition at line 15 of file TriggerAlgorithm.cc.

References conditionKeys_.

15  :
16  name_(),
17  alias_(),
18  logic_(),
19  tech_(),
20  bit_(),
21  gtlResult_(),
22  prescale_(),
23  mask_(),
26 {
27  conditionKeys_.clear();
28 }
bool gtlResult_
L1 algorithm result as determined on the GTL board.
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.
std::string alias_
L1 algorithm alias.
bool mask_
L1 algorithm mask.
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name)

Constructor from algorithm name only.

Definition at line 32 of file TriggerAlgorithm.cc.

References conditionKeys_.

32  :
33  name_( name ),
34  alias_(),
35  logic_(),
36  tech_(),
37  bit_(),
38  gtlResult_(),
39  prescale_(),
40  mask_(),
43 {
44  conditionKeys_.clear();
45 }
bool gtlResult_
L1 algorithm result as determined on the GTL board.
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.
std::string alias_
L1 algorithm alias.
const std::string & name() const
Get L1 algorithm name.
bool mask_
L1 algorithm mask.
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
unsigned prescale_
L1 algorithm pre-scale.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name,
const std::string &  alias,
bool  tech,
unsigned  bit,
unsigned  prescale,
bool  mask,
bool  decisionBeforeMask,
bool  decisionAfterMask 
)

Constructors from values.

Definition at line 49 of file TriggerAlgorithm.cc.

References conditionKeys_.

49  :
50  name_( name ),
51  alias_( alias),
52  logic_(),
53  tech_( tech ),
54  bit_( bit ),
55  gtlResult_(),
57  mask_( mask ),
60 {
61  conditionKeys_.clear();
62 }
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.
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.
std::string alias_
L1 algorithm alias.
unsigned prescale() const
Get L1 algorithm pre-scale.
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.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name,
const std::string &  alias,
bool  tech,
unsigned  bit,
bool  gtlResult,
unsigned  prescale,
bool  mask,
bool  decisionBeforeMask,
bool  decisionAfterMask 
)

Definition at line 63 of file TriggerAlgorithm.cc.

References conditionKeys_.

63  :
64  name_( name ),
65  alias_( alias),
66  logic_(),
67  tech_( tech ),
68  bit_( bit ),
71  mask_( mask ),
74 {
75  conditionKeys_.clear();
76 }
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.
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.
std::string alias_
L1 algorithm alias.
unsigned prescale() const
Get L1 algorithm pre-scale.
bool gtlResult() const
Get L1 algorithm GTL result.
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.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
virtual pat::TriggerAlgorithm::~TriggerAlgorithm ( )
inlinevirtual

Destructor.

Definition at line 75 of file TriggerAlgorithm.h.

75 {};

Member Function Documentation

void pat::TriggerAlgorithm::addConditionKey ( unsigned  conditionKey)
inline

Add a new trigger condition collection index.

Definition at line 100 of file TriggerAlgorithm.h.

References conditionKeys_, and hasConditionKey().

Referenced by pat::PATTriggerProducer::produce().

100 { if ( ! hasConditionKey( conditionKey ) ) conditionKeys_.push_back( conditionKey ); };
std::vector< unsigned > conditionKeys_
bool hasConditionKey(unsigned conditionKey) const
Checks, if a certain trigger condition collection index is assigned.
const std::string& pat::TriggerAlgorithm::alias ( ) const
inline

Get L1 algorithm alias.

Definition at line 104 of file TriggerAlgorithm.h.

References alias_.

Referenced by setAlias().

104 { return alias_; };
std::string alias_
L1 algorithm alias.
unsigned pat::TriggerAlgorithm::bit ( ) const
inline

Get L1 algorithm bit number.

Definition at line 110 of file TriggerAlgorithm.h.

References bit_.

Referenced by setBit().

110 { return bit_; };
unsigned bit_
L1 algorithm bit number.
const std::vector< unsigned >& pat::TriggerAlgorithm::conditionKeys ( ) const
inline

Get all trigger condition collection indeces.

Definition at line 125 of file TriggerAlgorithm.h.

References conditionKeys_.

Referenced by hasConditionKey().

125 { return conditionKeys_; };
std::vector< unsigned > conditionKeys_
bool pat::TriggerAlgorithm::decision ( ) const
inline

Get L1 algorithm decision as applied, identical to L1 algorithm decision, considering the mask

Definition at line 123 of file TriggerAlgorithm.h.

References decisionAfterMask().

Referenced by pat::PATTriggerProducer::produce().

123 { return decisionAfterMask(); };
bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
bool pat::TriggerAlgorithm::decisionAfterMask ( ) const
inline

Get L1 algorithm decision, considering the mask.

Definition at line 120 of file TriggerAlgorithm.h.

References decisionAfterMask_.

Referenced by decision(), and setDecisionAfterMas().

120 { return decisionAfterMask_; };
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
bool pat::TriggerAlgorithm::decisionBeforeMask ( ) const
inline

Get L1 algorithm decision, not considering the mask.

Definition at line 118 of file TriggerAlgorithm.h.

References decisionBeforeMask_.

Referenced by setDecisionBeforeMask().

118 { return decisionBeforeMask_; };
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
bool pat::TriggerAlgorithm::gtlResult ( ) const
inline

Get L1 algorithm GTL result.

Definition at line 112 of file TriggerAlgorithm.h.

References gtlResult_.

Referenced by setGtlResult().

112 { return gtlResult_; };
bool gtlResult_
L1 algorithm result as determined on the GTL board.
bool TriggerAlgorithm::hasConditionKey ( unsigned  conditionKey) const

Checks, if a certain trigger condition collection index is assigned.

Definition at line 83 of file TriggerAlgorithm.cc.

References conditionKeys().

Referenced by addConditionKey().

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.
const std::string& pat::TriggerAlgorithm::logicalExpression ( ) const
inline

Get L1 algorithm logical expression.

Definition at line 106 of file TriggerAlgorithm.h.

References logic_.

106 { return logic_; };
std::string logic_
L1 algorithm logival expression.
bool pat::TriggerAlgorithm::mask ( ) const
inline

Get L1 algorithm mask.

Definition at line 116 of file TriggerAlgorithm.h.

References mask_.

Referenced by setMask().

116 { return mask_; };
bool mask_
L1 algorithm mask.
const std::string& pat::TriggerAlgorithm::name ( ) const
inline
unsigned pat::TriggerAlgorithm::prescale ( ) const
inline

Get L1 algorithm pre-scale.

Definition at line 114 of file TriggerAlgorithm.h.

References prescale_.

Referenced by setPrescale().

114 { return prescale_; };
unsigned prescale_
L1 algorithm pre-scale.
void pat::TriggerAlgorithm::setAlias ( const std::string &  alias)
inline

Set L1 algorithm alias.

Definition at line 82 of file TriggerAlgorithm.h.

References alias(), and alias_.

82 { alias_ = alias; };
const std::string & alias() const
Get L1 algorithm alias.
std::string alias_
L1 algorithm alias.
void pat::TriggerAlgorithm::setBit ( unsigned  bit)
inline

Set L1 algorithm bit number.

Definition at line 88 of file TriggerAlgorithm.h.

References bit(), and bit_.

88 { bit_ = bit; };
unsigned bit_
L1 algorithm bit number.
unsigned bit() const
Get L1 algorithm bit number.
void pat::TriggerAlgorithm::setDecisionAfterMas ( bool  decisionAfterMask)
inline

Set L1 algorithm decision, considering the mask.

Definition at line 98 of file TriggerAlgorithm.h.

References decisionAfterMask(), and decisionAfterMask_.

bool decisionAfterMask() const
Get L1 algorithm decision, considering the mask.
bool decisionAfterMask_
L1 algorithm decision, considering the mask.
void pat::TriggerAlgorithm::setDecisionBeforeMask ( bool  decisionBeforeMask)
inline

Set L1 algorithm decision, not considering the mask.

Definition at line 96 of file TriggerAlgorithm.h.

References decisionBeforeMask(), and decisionBeforeMask_.

bool decisionBeforeMask() const
Get L1 algorithm decision, not considering the mask.
bool decisionBeforeMask_
L1 algorithm decision, not considering the mask.
void pat::TriggerAlgorithm::setGtlResult ( bool  gtlResult)
inline

Set L1 algorithm GTL result.

Definition at line 90 of file TriggerAlgorithm.h.

References gtlResult(), and gtlResult_.

Referenced by pat::PATTriggerProducer::produce().

90 { gtlResult_ = gtlResult; };
bool gtlResult_
L1 algorithm result as determined on the GTL board.
bool gtlResult() const
Get L1 algorithm GTL result.
void pat::TriggerAlgorithm::setLogicalExpression ( const std::string &  expression)
inline

Set L1 algorithm logical expression.

Definition at line 84 of file TriggerAlgorithm.h.

References logic_.

Referenced by pat::PATTriggerProducer::produce().

84 { logic_ = expression; };
std::string logic_
L1 algorithm logival expression.
void pat::TriggerAlgorithm::setMask ( bool  mask)
inline

Set L1 algorithm mask.

Definition at line 94 of file TriggerAlgorithm.h.

References mask(), and mask_.

94 { mask_ = mask; };
bool mask() const
Get L1 algorithm mask.
bool mask_
L1 algorithm mask.
void pat::TriggerAlgorithm::setName ( const std::string &  name)
inline

Methods.

Set L1 algorithm name

Definition at line 80 of file TriggerAlgorithm.h.

References name(), and name_.

Referenced by Vispa.Gui.PortWidget.PortWidget::__init__(), and Vispa.Views.PropertyView.Property::__init__().

80 { name_ = name; };
std::string name_
Data Members.
const std::string & name() const
Get L1 algorithm name.
void pat::TriggerAlgorithm::setPrescale ( unsigned  prescale)
inline

Set L1 algorithm pre-scale.

Definition at line 92 of file TriggerAlgorithm.h.

References prescale(), and prescale_.

92 { prescale_ = prescale; };
unsigned prescale() const
Get L1 algorithm pre-scale.
unsigned prescale_
L1 algorithm pre-scale.
void pat::TriggerAlgorithm::setTechTrigger ( bool  tech)
inline

Set flag for technical L1 algorithms.

Definition at line 86 of file TriggerAlgorithm.h.

References tech_.

86 { tech_ = tech; };
bool tech_
Flag for technical L1 algorithms.
bool pat::TriggerAlgorithm::techTrigger ( ) const
inline

Get flag for technical L1 algorithms.

Definition at line 108 of file TriggerAlgorithm.h.

References tech_.

108 { return tech_; };
bool tech_
Flag for technical L1 algorithms.

Member Data Documentation

std::string pat::TriggerAlgorithm::alias_
private

L1 algorithm alias.

Definition at line 41 of file TriggerAlgorithm.h.

Referenced by alias(), and setAlias().

unsigned pat::TriggerAlgorithm::bit_
private

L1 algorithm bit number.

Definition at line 47 of file TriggerAlgorithm.h.

Referenced by bit(), and setBit().

std::vector< unsigned > pat::TriggerAlgorithm::conditionKeys_
private

Indeces of trigger conditions in pat::TriggerConditionCollection in event as produced together with the pat::TriggerAlgorithmCollection

Definition at line 60 of file TriggerAlgorithm.h.

Referenced by addConditionKey(), conditionKeys(), and TriggerAlgorithm().

bool pat::TriggerAlgorithm::decisionAfterMask_
private

L1 algorithm decision, considering the mask.

Definition at line 57 of file TriggerAlgorithm.h.

Referenced by decisionAfterMask(), and setDecisionAfterMas().

bool pat::TriggerAlgorithm::decisionBeforeMask_
private

L1 algorithm decision, not considering the mask.

Definition at line 55 of file TriggerAlgorithm.h.

Referenced by decisionBeforeMask(), and setDecisionBeforeMask().

bool pat::TriggerAlgorithm::gtlResult_
private

L1 algorithm result as determined on the GTL board.

Definition at line 49 of file TriggerAlgorithm.h.

Referenced by gtlResult(), and setGtlResult().

std::string pat::TriggerAlgorithm::logic_
private

L1 algorithm logival expression.

Definition at line 43 of file TriggerAlgorithm.h.

Referenced by logicalExpression(), and setLogicalExpression().

bool pat::TriggerAlgorithm::mask_
private

L1 algorithm mask.

Definition at line 53 of file TriggerAlgorithm.h.

Referenced by mask(), and setMask().

std::string pat::TriggerAlgorithm::name_
private

Data Members.

L1 algorithm name

Definition at line 39 of file TriggerAlgorithm.h.

Referenced by name(), and setName().

unsigned pat::TriggerAlgorithm::prescale_
private

L1 algorithm pre-scale.

Definition at line 51 of file TriggerAlgorithm.h.

Referenced by prescale(), and setPrescale().

bool pat::TriggerAlgorithm::tech_
private

Flag for technical L1 algorithms.

Definition at line 45 of file TriggerAlgorithm.h.

Referenced by setTechTrigger(), and techTrigger().