CMS 3D CMS Logo

Public Member Functions | Private Attributes

pat::TriggerAlgorithm Class Reference

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

#include <DataFormats/PatCandidates/interface/TriggerAlgorithm.h>

List of all members.

Public Member Functions

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

Private Attributes

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

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
Version:
Id:
TriggerAlgorithm.h,v 1.4 2011/02/22 18:29:50 vadler Exp

Definition at line 36 of file TriggerAlgorithm.h.


Constructor & Destructor Documentation

TriggerAlgorithm::TriggerAlgorithm ( )

Constructors and Destructor.

Default constructor

Definition at line 16 of file TriggerAlgorithm.cc.

References conditionKeys_.

TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name)

Constructor from algorithm name only.

Definition at line 32 of file TriggerAlgorithm.cc.

References conditionKeys_.

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_.

TriggerAlgorithm::TriggerAlgorithm ( const std::string &  name,
const std::string &  alias,
bool  tech,
unsigned  bit,
bool  gtlResult,
unsigned  prescale,
bool  mask,
bool  decisionBeforeMask,
bool  decisionAfterMask 
)
virtual pat::TriggerAlgorithm::~TriggerAlgorithm ( ) [inline, virtual]

Destructor.

Definition at line 77 of file TriggerAlgorithm.h.

{};

Member Function Documentation

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

Add a new trigger condition collection index.

Definition at line 102 of file TriggerAlgorithm.h.

References conditionKeys_, and hasConditionKey().

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

{ if ( ! hasConditionKey( conditionKey ) ) conditionKeys_.push_back( conditionKey ); };
std::string pat::TriggerAlgorithm::alias ( ) const [inline]

Get L1 algorithm alias.

Definition at line 106 of file TriggerAlgorithm.h.

References alias_.

Referenced by setAlias().

{ return alias_; };
unsigned pat::TriggerAlgorithm::bit ( ) const [inline]

Get L1 algorithm bit number.

Definition at line 112 of file TriggerAlgorithm.h.

References bit_.

Referenced by setBit().

{ return bit_; };
std::vector< unsigned > pat::TriggerAlgorithm::conditionKeys ( ) const [inline]

Get all trigger condition collection indeces.

Definition at line 127 of file TriggerAlgorithm.h.

References conditionKeys_.

Referenced by pat::TriggerEvent::algorithmConditions(), and hasConditionKey().

{ return conditionKeys_; };
bool pat::TriggerAlgorithm::decision ( ) const [inline]

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

Definition at line 125 of file TriggerAlgorithm.h.

References decisionAfterMask().

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

{ return decisionAfterMask(); };
bool pat::TriggerAlgorithm::decisionAfterMask ( ) const [inline]

Get L1 algorithm decision, considering the mask.

Definition at line 122 of file TriggerAlgorithm.h.

References decisionAfterMask_.

Referenced by decision(), and setDecisionAfterMas().

{ return decisionAfterMask_; };
bool pat::TriggerAlgorithm::decisionBeforeMask ( ) const [inline]

Get L1 algorithm decision, not considering the mask.

Definition at line 120 of file TriggerAlgorithm.h.

References decisionBeforeMask_.

Referenced by setDecisionBeforeMask().

{ return decisionBeforeMask_; };
bool pat::TriggerAlgorithm::gtlResult ( ) const [inline]

Get L1 algorithm GTL result.

Definition at line 114 of file TriggerAlgorithm.h.

References gtlResult_.

Referenced by setGtlResult().

{ return gtlResult_; };
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().

{
  for ( size_t iO = 0; iO < conditionKeys().size(); ++iO ) {
    if ( conditionKeys().at( iO ) == conditionKey ) {
      return true;
    }
  }
  return false;
}
std::string pat::TriggerAlgorithm::logicalExpression ( ) const [inline]

Get L1 algorithm logical expression.

Definition at line 108 of file TriggerAlgorithm.h.

References logic_.

{ return logic_; };
bool pat::TriggerAlgorithm::mask ( ) const [inline]

Get L1 algorithm mask.

Definition at line 118 of file TriggerAlgorithm.h.

References mask_.

Referenced by setMask().

{ return mask_; };
std::string pat::TriggerAlgorithm::name ( ) const [inline]

Get L1 algorithm name.

Definition at line 104 of file TriggerAlgorithm.h.

References name_.

Referenced by pat::PATTriggerProducer::produce(), and setName().

{ return name_; };
unsigned pat::TriggerAlgorithm::prescale ( ) const [inline]

Get L1 algorithm pre-scale.

Definition at line 116 of file TriggerAlgorithm.h.

References prescale_.

Referenced by setPrescale().

{ return prescale_; };
void pat::TriggerAlgorithm::setAlias ( const std::string &  alias) [inline]

Set L1 algorithm alias.

Definition at line 84 of file TriggerAlgorithm.h.

References alias(), and alias_.

{ alias_ = alias; };
void pat::TriggerAlgorithm::setBit ( unsigned  bit) [inline]

Set L1 algorithm bit number.

Definition at line 90 of file TriggerAlgorithm.h.

References bit(), and bit_.

{ bit_ = bit; };
void pat::TriggerAlgorithm::setDecisionAfterMas ( bool  decisionAfterMask) [inline]

Set L1 algorithm decision, considering the mask.

Definition at line 100 of file TriggerAlgorithm.h.

References decisionAfterMask(), and decisionAfterMask_.

void pat::TriggerAlgorithm::setDecisionBeforeMask ( bool  decisionBeforeMask) [inline]

Set L1 algorithm decision, not considering the mask.

Definition at line 98 of file TriggerAlgorithm.h.

References decisionBeforeMask(), and decisionBeforeMask_.

void pat::TriggerAlgorithm::setGtlResult ( bool  gtlResult) [inline]

Set L1 algorithm GTL result.

Definition at line 92 of file TriggerAlgorithm.h.

References gtlResult(), and gtlResult_.

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

void pat::TriggerAlgorithm::setLogicalExpression ( const std::string &  expression) [inline]

Set L1 algorithm logical expression.

Definition at line 86 of file TriggerAlgorithm.h.

References logic_.

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

{ logic_ = expression; };
void pat::TriggerAlgorithm::setMask ( bool  mask) [inline]

Set L1 algorithm mask.

Definition at line 96 of file TriggerAlgorithm.h.

References mask(), and mask_.

{ mask_ = mask; };
void pat::TriggerAlgorithm::setName ( const std::string &  name) [inline]

Methods.

Set L1 algorithm name

Definition at line 82 of file TriggerAlgorithm.h.

References name(), and name_.

{ name_ = name; };
void pat::TriggerAlgorithm::setPrescale ( unsigned  prescale) [inline]

Set L1 algorithm pre-scale.

Definition at line 94 of file TriggerAlgorithm.h.

References prescale(), and prescale_.

void pat::TriggerAlgorithm::setTechTrigger ( bool  tech) [inline]

Set flag for technical L1 algorithms.

Definition at line 88 of file TriggerAlgorithm.h.

References tech_.

{ tech_ = tech; };
bool pat::TriggerAlgorithm::techTrigger ( ) const [inline]

Get flag for technical L1 algorithms.

Definition at line 110 of file TriggerAlgorithm.h.

References tech_.

{ return tech_; };

Member Data Documentation

std::string pat::TriggerAlgorithm::alias_ [private]

L1 algorithm alias.

Definition at line 43 of file TriggerAlgorithm.h.

Referenced by alias(), and setAlias().

unsigned pat::TriggerAlgorithm::bit_ [private]

L1 algorithm bit number.

Definition at line 49 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 62 of file TriggerAlgorithm.h.

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

L1 algorithm decision, considering the mask.

Definition at line 59 of file TriggerAlgorithm.h.

Referenced by decisionAfterMask(), and setDecisionAfterMas().

L1 algorithm decision, not considering the mask.

Definition at line 57 of file TriggerAlgorithm.h.

Referenced by decisionBeforeMask(), and setDecisionBeforeMask().

L1 algorithm result as determined on the GTL board.

Definition at line 51 of file TriggerAlgorithm.h.

Referenced by gtlResult(), and setGtlResult().

std::string pat::TriggerAlgorithm::logic_ [private]

L1 algorithm logival expression.

Definition at line 45 of file TriggerAlgorithm.h.

Referenced by logicalExpression(), and setLogicalExpression().

L1 algorithm mask.

Definition at line 55 of file TriggerAlgorithm.h.

Referenced by mask(), and setMask().

std::string pat::TriggerAlgorithm::name_ [private]

Data Members.

L1 algorithm name

Definition at line 41 of file TriggerAlgorithm.h.

Referenced by name(), and setName().

L1 algorithm pre-scale.

Definition at line 53 of file TriggerAlgorithm.h.

Referenced by prescale(), and setPrescale().

Flag for technical L1 algorithms.

Definition at line 47 of file TriggerAlgorithm.h.

Referenced by setTechTrigger(), and techTrigger().