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 (const L1Seed &seed)
 Add a new L1 seed.
void addL1Seed (bool decision, const std::string &expression)
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 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 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, unsigned index, unsigned prescale, bool run, bool accept, bool error, unsigned lastActiveFilterSlot)
 Constructor from values.
 TriggerPath (const std::string &name)
 Constructor from path name only.
bool wasAccept () const
 Get the success flag.
bool wasError () const
 Get the error flag.
bool wasRun () const
 Get the run flag.
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 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.9 2011/02/22 18:29:50 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_()
{
  modules_.clear();
  filterIndices_.clear();
}
TriggerPath::TriggerPath ( const std::string &  name)

Constructor from path name only.

Definition at line 31 of file TriggerPath.cc.

References filterIndices_, and modules_.

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

Constructor from values.

Definition at line 46 of file TriggerPath.cc.

References filterIndices_, and modules_.

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

Destructor.

Definition at line 84 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 136 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 105 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 107 of file TriggerPath.h.

References l1Seeds_.

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

Definition at line 108 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 103 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 138 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 126 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 112 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 64 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() );
}
std::vector< std::string > TriggerPath::l1Seeds ( const bool  decision) const

Get names of all L1 seeds with a certain decision.

Definition at line 72 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;

}
L1SeedCollection pat::TriggerPath::l1Seeds ( ) const [inline]

Get all L1 seeds.

Definition at line 132 of file TriggerPath.h.

References l1Seeds_.

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

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

Get the index of the last active filter.

Definition at line 122 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 124 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 110 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 114 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 97 of file TriggerPath.h.

References accept(), and accept_.

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

Set the error flag.

Definition at line 99 of file TriggerPath.h.

References error, and error_.

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

Set the path index.

Definition at line 91 of file TriggerPath.h.

References index(), and index_.

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

Set the index of the last active filter.

Definition at line 101 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 89 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 93 of file TriggerPath.h.

References prescale(), and prescale_.

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

Set the run flag.

Definition at line 95 of file TriggerPath.h.

References CrabTask::run, and run_.

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

Get the success flag.

Definition at line 118 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 120 of file TriggerPath.h.

References error_.

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

Get the run flag.

Definition at line 116 of file TriggerPath.h.

References run_.

{ return run_; };

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 70 of file TriggerPath.h.

Referenced by addL1Seed(), and l1Seeds().

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().