Analysis-level L1 trigger condition class. More...
#include <DataFormats/PatCandidates/interface/TriggerCondition.h>
Public Member Functions | |
void | addObjectKey (unsigned objectKey) |
Add a new trigger object collection index. | |
void | addTriggerObjectType (trigger::TriggerObjectType triggerObjectType) |
Add a new trigger object type. | |
void | addTriggerObjectType (int triggerObjectType) |
int | category () const |
Get the condition category. | |
bool | hasObjectKey (unsigned objectKey) const |
Checks, if a certain trigger object collection index is assigned. | |
bool | hasTriggerObjectType (trigger::TriggerObjectType triggerObjectType) const |
Checks, if a certain trigger object type is assigned. | |
bool | hasTriggerObjectType (int triggerObjectType) const |
std::string | name () const |
Get the filter label. | |
std::vector< unsigned > | objectKeys () const |
Get all trigger object collection indeces. | |
void | setAccept (bool accept) |
Set the success flag. | |
void | setCategory (L1GtConditionCategory category) |
Set the condition category. | |
void | setCategory (int category) |
void | setName (const std::string &name) |
Methods. | |
void | setType (L1GtConditionType type) |
Set the condition type. | |
void | setType (int type) |
TriggerCondition () | |
Constructors and Desctructor. | |
TriggerCondition (const std::string &name) | |
Constructor from condition name "only". | |
TriggerCondition (const std::string &name, bool accept) | |
Constructor from values. | |
std::vector< int > | triggerObjectTypes () const |
Get the trigger object types. | |
int | type () const |
Get the condition type. | |
bool | wasAccept () const |
Get the success flag. | |
virtual | ~TriggerCondition () |
Destructor. | |
Private Attributes | |
bool | accept_ |
Did condition succeed? | |
L1GtConditionCategory | category_ |
L1 condition category as defined in CondFormats/L1TObjects/interface/L1GtFwd.h. | |
std::string | name_ |
Data Members. | |
std::vector< unsigned > | objectKeys_ |
std::vector < trigger::TriggerObjectType > | triggerObjectTypes_ |
L1GtConditionType | type_ |
L1 condition type as defined in CondFormats/L1TObjects/interface/L1GtFwd.h. |
Analysis-level L1 trigger condition class.
TriggerCondition implements a container for trigger conditions' information within the 'pat' namespace. For detailed information, consult https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#TriggerCondition
Definition at line 38 of file TriggerCondition.h.
TriggerCondition::TriggerCondition | ( | ) |
Constructors and Desctructor.
Default constructor
Definition at line 16 of file TriggerCondition.cc.
References objectKeys_, and triggerObjectTypes_.
: name_() , accept_() , category_() , type_() { triggerObjectTypes_.clear(); objectKeys_.clear(); }
TriggerCondition::TriggerCondition | ( | const std::string & | name | ) |
Constructor from condition name "only".
Definition at line 28 of file TriggerCondition.cc.
References objectKeys_, and triggerObjectTypes_.
: name_( name ) , accept_() , category_() , type_() { triggerObjectTypes_.clear(); objectKeys_.clear(); }
TriggerCondition::TriggerCondition | ( | const std::string & | name, |
bool | accept | ||
) |
Constructor from values.
Definition at line 40 of file TriggerCondition.cc.
References objectKeys_, and triggerObjectTypes_.
: name_( name ) , accept_( accept ) , category_() , type_() { triggerObjectTypes_.clear(); objectKeys_.clear(); }
virtual pat::TriggerCondition::~TriggerCondition | ( | ) | [inline, virtual] |
void pat::TriggerCondition::addObjectKey | ( | unsigned | objectKey | ) | [inline] |
Add a new trigger object collection index.
Definition at line 88 of file TriggerCondition.h.
References hasObjectKey(), and objectKeys_.
{ if ( ! hasObjectKey( objectKey ) ) objectKeys_.push_back( objectKey ); };
void pat::TriggerCondition::addTriggerObjectType | ( | trigger::TriggerObjectType | triggerObjectType | ) | [inline] |
Add a new trigger object type.
Definition at line 85 of file TriggerCondition.h.
References triggerObjectTypes_.
{ triggerObjectTypes_.push_back( triggerObjectType ); }; // explicitely NOT checking for existence
void pat::TriggerCondition::addTriggerObjectType | ( | int | triggerObjectType | ) | [inline] |
Definition at line 86 of file TriggerCondition.h.
References addTriggerObjectType().
Referenced by addTriggerObjectType().
{ addTriggerObjectType( trigger::TriggerObjectType( triggerObjectType ) ); };
int pat::TriggerCondition::category | ( | ) | const [inline] |
Get the condition category.
Definition at line 94 of file TriggerCondition.h.
References category_.
Referenced by setCategory().
{ return int( category_ ); };
bool TriggerCondition::hasObjectKey | ( | unsigned | objectKey | ) | const |
Checks, if a certain trigger object collection index is assigned.
Definition at line 76 of file TriggerCondition.cc.
References objectKeys_.
Referenced by addObjectKey(), pat::TriggerEvent::conditionCollections(), pat::TriggerEvent::conditionObjects(), and pat::TriggerEvent::objectInCondition().
{ for ( size_t iO = 0; iO < objectKeys_.size(); ++iO ) { if ( objectKeys_.at( iO ) == objectKey ) return true; } return false; }
bool pat::TriggerCondition::hasTriggerObjectType | ( | int | triggerObjectType | ) | const [inline] |
Definition at line 101 of file TriggerCondition.h.
References hasTriggerObjectType().
Referenced by hasTriggerObjectType().
{ return hasTriggerObjectType( trigger::TriggerObjectType( triggerObjectType ) ); };
bool TriggerCondition::hasTriggerObjectType | ( | trigger::TriggerObjectType | triggerObjectType | ) | const |
Checks, if a certain trigger object type is assigned.
Definition at line 66 of file TriggerCondition.cc.
References triggerObjectTypes_.
{ for ( size_t iT = 0; iT < triggerObjectTypes_.size(); ++iT ) { if ( triggerObjectTypes_.at( iT ) == triggerObjectType ) return true; } return false; }
std::string pat::TriggerCondition::name | ( | ) | const [inline] |
Get the filter label.
Definition at line 90 of file TriggerCondition.h.
References name_.
Referenced by setName().
{ return name_; };
std::vector< unsigned > pat::TriggerCondition::objectKeys | ( | ) | const [inline] |
Get all trigger object collection indeces.
Definition at line 103 of file TriggerCondition.h.
References objectKeys_.
{ return objectKeys_; };
void pat::TriggerCondition::setAccept | ( | bool | accept | ) | [inline] |
void pat::TriggerCondition::setCategory | ( | int | category | ) | [inline] |
Definition at line 80 of file TriggerCondition.h.
References category_.
{ category_ = L1GtConditionCategory( category ); };
void pat::TriggerCondition::setCategory | ( | L1GtConditionCategory | category | ) | [inline] |
Set the condition category.
Definition at line 79 of file TriggerCondition.h.
References category(), and category_.
Referenced by pat::PATTriggerProducer::produce().
void pat::TriggerCondition::setName | ( | const std::string & | name | ) | [inline] |
void pat::TriggerCondition::setType | ( | L1GtConditionType | type | ) | [inline] |
void pat::TriggerCondition::setType | ( | int | type | ) | [inline] |
Definition at line 83 of file TriggerCondition.h.
References type_.
{ type_ = L1GtConditionType( type ); };
std::vector< int > TriggerCondition::triggerObjectTypes | ( | ) | const |
Get the trigger object types.
Definition at line 55 of file TriggerCondition.cc.
References triggerObjectTypes_.
{ std::vector< int > triggerObjectTypes; for ( size_t iT = 0; iT < triggerObjectTypes_.size(); ++iT ) { triggerObjectTypes.push_back( int( triggerObjectTypes_.at( iT ) ) ); } return triggerObjectTypes; }
int pat::TriggerCondition::type | ( | ) | const [inline] |
Get the condition type.
Definition at line 96 of file TriggerCondition.h.
References type_.
Referenced by setType().
{ return int( type_ ); };
bool pat::TriggerCondition::wasAccept | ( | ) | const [inline] |
Get the success flag.
Definition at line 92 of file TriggerCondition.h.
References accept_.
{ return accept_; };
bool pat::TriggerCondition::accept_ [private] |
Did condition succeed?
Definition at line 45 of file TriggerCondition.h.
Referenced by setAccept(), and wasAccept().
L1 condition category as defined in CondFormats/L1TObjects/interface/L1GtFwd.h.
Definition at line 47 of file TriggerCondition.h.
Referenced by category(), and setCategory().
std::string pat::TriggerCondition::name_ [private] |
std::vector< unsigned > pat::TriggerCondition::objectKeys_ [private] |
Indeces of trigger objects from succeeding combinations in pat::TriggerObjectCollection in event as produced together with the pat::TriggerAlgorithmCollection
Definition at line 56 of file TriggerCondition.h.
Referenced by addObjectKey(), hasObjectKey(), objectKeys(), and TriggerCondition().
std::vector< trigger::TriggerObjectType > pat::TriggerCondition::triggerObjectTypes_ [private] |
Special identifiers for the used trigger object type as defined in DataFormats/HLTReco/interface/TriggerTypeDefs.h translated from L1GtObject type (DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h)
Definition at line 53 of file TriggerCondition.h.
Referenced by addTriggerObjectType(), hasTriggerObjectType(), TriggerCondition(), and triggerObjectTypes().
L1 condition type as defined in CondFormats/L1TObjects/interface/L1GtFwd.h.
Definition at line 49 of file TriggerCondition.h.