CMS 3D CMS Logo

Public Member Functions | Private Attributes

pat::TriggerPath Class Reference

Analysis-level HLTrigger path class. More...

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

List of all members.

Public Member Functions

std::vector< std::string > acceptedL1Seeds () const
 Get names of all succeeding L1 seeds.
void addFilterIndex (const unsigned index)
 Add a new trigger fillter collection index.
void addL1Seed (bool decision, const std::string &expression)
void addL1Seed (const L1Seed &seed)
 Add a new L1 seed.
void addModule (const std::string &name)
 Add a new module label.
std::vector< std::string > failedL1Seeds () const
 Get names of all failing L1 seeds.
std::vector< unsigned > filterIndices () const
 Get all trigger fillter collection indeces.
unsigned index () const
 Get the path index.
int indexModule (const std::string &name) const
L1SeedCollection l1Seeds () const
 Get all L1 seeds.
std::vector< std::string > l1Seeds (const bool decision) const
 Get names of all L1 seeds with a certain decision.
unsigned l3Filters () const
unsigned lastActiveFilterSlot () const
 Get the index of the last active filter.
std::vector< std::string > modules () const
 Get all module labels.
std::string name () const
 Get the path name.
unsigned prescale () const
 Get the path pre-scale.
void setAccept (bool accept)
 Set the success flag.
void setError (bool error)
 Set the error flag.
void setIndex (unsigned index)
 Set the path index.
void setL3Filters (unsigned l3Filters)
 Set the number of modules identified as L3 filter.
void setLastActiveFilterSlot (unsigned lastActiveFilterSlot)
 Set the index of the last active filter.
void setName (const std::string &name)
 Methods.
void setPrescale (unsigned prescale)
 Set the path pre-scale.
void setRun (bool run)
 Set the run flag.
 TriggerPath ()
 Constructors and Desctructor.
 TriggerPath (const std::string &name)
 Constructor from path name only.
 TriggerPath (const std::string &name, unsigned index, unsigned prescale, bool run, bool accept, bool error, unsigned lastActiveFilterSlot, unsigned l3Filters=0)
 Constructor from values.
bool wasAccept () const
 Get the success flag.
bool wasError () const
 Get the error flag.
bool wasRun () const
 Get the run flag.
bool xTrigger () const
virtual ~TriggerPath ()
 Destructor.

Private Attributes

bool accept_
 Did path succeed?
bool error_
 Was path in error?
std::vector< unsigned > filterIndices_
unsigned index_
 Path index in trigger table.
L1SeedCollection l1Seeds_
 List of L1 seeds and their decisions.
unsigned l3Filters_
unsigned lastActiveFilterSlot_
 Index of the last active filter in the list of modules.
std::vector< std::string > modules_
std::string name_
 Data Members.
unsigned prescale_
 Pre-scale.
bool run_
 Was path run?

Detailed Description

Analysis-level HLTrigger path class.

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

Author:
Volker Adler
Version:
Id:
TriggerPath.h,v 1.11 2011/05/28 13:40:57 vadler Exp

Definition at line 41 of file TriggerPath.h.


Constructor & Destructor Documentation

TriggerPath::TriggerPath ( )

Constructors and Desctructor.

Default constructor

Definition at line 16 of file TriggerPath.cc.

References filterIndices_, and modules_.

                         :
  name_(),
  index_(),
  prescale_(),
  run_(),
  accept_(),
  error_(),
  lastActiveFilterSlot_(),
  l3Filters_( 0 )
{
  modules_.clear();
  filterIndices_.clear();
}
TriggerPath::TriggerPath ( const std::string &  name)

Constructor from path name only.

Definition at line 32 of file TriggerPath.cc.

References filterIndices_, and modules_.

                                                 :
  name_( name ),
  index_(),
  prescale_(),
  run_(),
  accept_(),
  error_(),
  lastActiveFilterSlot_(),
  l3Filters_( 0 )
{
  modules_.clear();
  filterIndices_.clear();
}
TriggerPath::TriggerPath ( const std::string &  name,
unsigned  index,
unsigned  prescale,
bool  run,
bool  accept,
bool  error,
unsigned  lastActiveFilterSlot,
unsigned  l3Filters = 0 
)

Constructor from values.

Definition at line 48 of file TriggerPath.cc.

References filterIndices_, and modules_.

virtual pat::TriggerPath::~TriggerPath ( ) [inline, virtual]

Destructor.

Definition at line 87 of file TriggerPath.h.

{};

Member Function Documentation

std::vector< std::string > pat::TriggerPath::acceptedL1Seeds ( ) const [inline]

Get names of all succeeding L1 seeds.

Definition at line 147 of file TriggerPath.h.

References l1Seeds().

{ return l1Seeds( true ); };
void pat::TriggerPath::addFilterIndex ( const unsigned  index) [inline]

Add a new trigger fillter collection index.

Definition at line 110 of file TriggerPath.h.

References filterIndices_.

{ filterIndices_.push_back( index ); };
void pat::TriggerPath::addL1Seed ( const L1Seed seed) [inline]

Add a new L1 seed.

Definition at line 112 of file TriggerPath.h.

References l1Seeds_.

{ l1Seeds_.push_back( seed ); };
void pat::TriggerPath::addL1Seed ( bool  decision,
const std::string &  expression 
) [inline]

Definition at line 113 of file TriggerPath.h.

References l1Seeds_.

{ l1Seeds_.push_back( L1Seed( decision, expression ) ); };
void pat::TriggerPath::addModule ( const std::string &  name) [inline]

Add a new module label.

Definition at line 108 of file TriggerPath.h.

References modules_.

{ modules_.push_back( name ); };
std::vector< std::string > pat::TriggerPath::failedL1Seeds ( ) const [inline]

Get names of all failing L1 seeds.

Definition at line 149 of file TriggerPath.h.

References l1Seeds().

{ return l1Seeds( false ); };
std::vector< unsigned > pat::TriggerPath::filterIndices ( ) const [inline]

Get all trigger fillter collection indeces.

Definition at line 137 of file TriggerPath.h.

References filterIndices_.

Referenced by pat::TriggerEvent::pathFilters().

{ return filterIndices_; };
unsigned pat::TriggerPath::index ( ) const [inline]

Get the path index.

Definition at line 117 of file TriggerPath.h.

References index_.

Referenced by setIndex().

{ return index_; };
int TriggerPath::indexModule ( const std::string &  name) const

Get the index of a certain module; returns size of 'modules_' ( modules().size() ) if name is unknown and -1 if list of modules is not filled

Definition at line 67 of file TriggerPath.cc.

References spr::find(), modules_, and name().

{
  if ( modules_.begin() == modules_.end() ) return -1;
  return ( std::find( modules_.begin(), modules_.end(), name ) - modules_.begin() );
}
L1SeedCollection pat::TriggerPath::l1Seeds ( ) const [inline]

Get all L1 seeds.

Definition at line 143 of file TriggerPath.h.

References l1Seeds_.

Referenced by acceptedL1Seeds(), failedL1Seeds(), and l1Seeds().

{ return l1Seeds_; };
std::vector< std::string > TriggerPath::l1Seeds ( const bool  decision) const

Get names of all L1 seeds with a certain decision.

Definition at line 75 of file TriggerPath.cc.

References begin, and l1Seeds().

{

  std::vector< std::string > seeds;
  for ( L1SeedCollection::const_iterator iSeed = l1Seeds().begin(); iSeed != l1Seeds().end(); ++iSeed ) {
    if ( iSeed->first == decision ) seeds.push_back( iSeed->second );
  }
  return seeds;

}
unsigned pat::TriggerPath::l3Filters ( ) const [inline]

Get the number of modules identified as L3 filter available starting from CMSSW_4_2_3

Definition at line 130 of file TriggerPath.h.

References l3Filters_.

Referenced by setL3Filters().

{ return l3Filters_; };
unsigned pat::TriggerPath::lastActiveFilterSlot ( ) const [inline]

Get the index of the last active filter.

Definition at line 127 of file TriggerPath.h.

References lastActiveFilterSlot_.

Referenced by pat::TriggerEvent::pathModules(), and setLastActiveFilterSlot().

{ return lastActiveFilterSlot_; };
std::vector< std::string > pat::TriggerPath::modules ( ) const [inline]

Get all module labels.

Definition at line 135 of file TriggerPath.h.

References modules_.

Referenced by pat::TriggerEvent::pathModules().

{ return modules_; };
std::string pat::TriggerPath::name ( ) const [inline]

Get the path name.

Definition at line 115 of file TriggerPath.h.

References name_.

Referenced by indexModule(), and setName().

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

Get the path pre-scale.

Definition at line 119 of file TriggerPath.h.

References prescale_.

Referenced by setPrescale().

{ return prescale_; };
void pat::TriggerPath::setAccept ( bool  accept) [inline]

Set the success flag.

Definition at line 100 of file TriggerPath.h.

References accept(), and accept_.

{ accept_ = accept; };
void pat::TriggerPath::setError ( bool  error) [inline]

Set the error flag.

Definition at line 102 of file TriggerPath.h.

References error, and error_.

{ error_ = error; };
void pat::TriggerPath::setIndex ( unsigned  index) [inline]

Set the path index.

Definition at line 94 of file TriggerPath.h.

References index(), and index_.

{ index_ = index; };
void pat::TriggerPath::setL3Filters ( unsigned  l3Filters) [inline]

Set the number of modules identified as L3 filter.

Definition at line 106 of file TriggerPath.h.

References l3Filters(), and l3Filters_.

void pat::TriggerPath::setLastActiveFilterSlot ( unsigned  lastActiveFilterSlot) [inline]

Set the index of the last active filter.

Definition at line 104 of file TriggerPath.h.

References lastActiveFilterSlot(), and lastActiveFilterSlot_.

void pat::TriggerPath::setName ( const std::string &  name) [inline]

Methods.

Set the path name

Definition at line 92 of file TriggerPath.h.

References name(), and name_.

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

Set the path pre-scale.

Definition at line 96 of file TriggerPath.h.

References prescale(), and prescale_.

void pat::TriggerPath::setRun ( bool  run) [inline]

Set the run flag.

Definition at line 98 of file TriggerPath.h.

References DTTTrigCorrFirst::run, and run_.

{ run_ = run; };
bool pat::TriggerPath::wasAccept ( ) const [inline]

Get the success flag.

Definition at line 123 of file TriggerPath.h.

References accept_.

Referenced by WPlusJetsEventSelector::operator()().

{ return accept_; };
bool pat::TriggerPath::wasError ( ) const [inline]

Get the error flag.

Definition at line 125 of file TriggerPath.h.

References error_.

{ return error_; };
bool pat::TriggerPath::wasRun ( ) const [inline]

Get the run flag.

Definition at line 121 of file TriggerPath.h.

References run_.

{ return run_; };
bool pat::TriggerPath::xTrigger ( ) const [inline]

Determines, if the path is a x-trigger, based on the number of modules identified as L3 filter available starting from CMSSW_4_2_3

Definition at line 133 of file TriggerPath.h.

References l3Filters_.

{ return ( l3Filters_ > 2 ); };

Member Data Documentation

bool pat::TriggerPath::accept_ [private]

Did path succeed?

Definition at line 54 of file TriggerPath.h.

Referenced by setAccept(), and wasAccept().

bool pat::TriggerPath::error_ [private]

Was path in error?

Definition at line 56 of file TriggerPath.h.

Referenced by setError(), and wasError().

std::vector< unsigned > pat::TriggerPath::filterIndices_ [private]

Indeces of trigger filters in pat::TriggerFilterCollection in event as produced together with the pat::TriggerPathCollection; also filled in correct order by PATTriggerProducer; indices of active filters in filter collection

Definition at line 66 of file TriggerPath.h.

Referenced by addFilterIndex(), filterIndices(), and TriggerPath().

unsigned pat::TriggerPath::index_ [private]

Path index in trigger table.

Definition at line 48 of file TriggerPath.h.

Referenced by index(), and setIndex().

List of L1 seeds and their decisions.

Definition at line 73 of file TriggerPath.h.

Referenced by addL1Seed(), and l1Seeds().

unsigned pat::TriggerPath::l3Filters_ [private]

Number of modules identified as L3 filters by the 'saveTags' parameter available starting from CMSSW_4_2_3

Definition at line 71 of file TriggerPath.h.

Referenced by l3Filters(), setL3Filters(), and xTrigger().

Index of the last active filter in the list of modules.

Definition at line 68 of file TriggerPath.h.

Referenced by lastActiveFilterSlot(), and setLastActiveFilterSlot().

std::vector< std::string > pat::TriggerPath::modules_ [private]

List of all module labels in the path filled in correct order by PATTriggerProducer; modules not necessarily in filter collection; consumes disc space

Definition at line 61 of file TriggerPath.h.

Referenced by addModule(), indexModule(), modules(), and TriggerPath().

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

Data Members.

Path name

Definition at line 46 of file TriggerPath.h.

Referenced by name(), and setName().

unsigned pat::TriggerPath::prescale_ [private]

Pre-scale.

Definition at line 50 of file TriggerPath.h.

Referenced by prescale(), and setPrescale().

bool pat::TriggerPath::run_ [private]

Was path run?

Definition at line 52 of file TriggerPath.h.

Referenced by setRun(), and wasRun().