CMS 3D CMS Logo

Public Member Functions | Private Attributes

pat::TriggerEvent Class Reference

Analysis-level trigger event class. More...

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

List of all members.

Public Member Functions

TriggerAlgorithmRefVector acceptedAlgorithms () const
 Get a vector of references to all succeeding L1 algorithms.
TriggerAlgorithmRefVector acceptedAlgorithmsGtl () const
 Get a vector of references to all L1 algorithms succeeding on the GTL board.
TriggerConditionRefVector acceptedConditions () const
 Get a vector of references to all succeeding L1 condition.
TriggerFilterRefVector acceptedFilters () const
 Get a vector of references to all succeeding HLT filters.
TriggerPathRefVector acceptedPaths () const
 Get a vector of references to all succeeding HLT paths.
TriggerAlgorithmRefVector acceptedPhysAlgorithms () const
 Get a vector of references to all succeeding physics L1 algorithms.
TriggerAlgorithmRefVector acceptedPhysAlgorithmsGtl () const
 Get a vector of references to all physics L1 algorithms succeeding on the GTL board.
TriggerAlgorithmRefVector acceptedTechAlgorithms () const
 Get a vector of references to all succeeding technical L1 algorithms.
TriggerAlgorithmRefVector acceptedTechAlgorithmsGtl () const
 Get a vector of references to all technical L1 algorithms succeeding on the GTL board.
bool addObjectMatchResult (const TriggerObjectMatchRefProd &trigMatches, const std::string &labelMatcher)
bool addObjectMatchResult (const edm::Handle< TriggerObjectMatch > &trigMatches, const std::string &labelMatcher)
bool addObjectMatchResult (const edm::OrphanHandle< TriggerObjectMatch > &trigMatches, const std::string &labelMatcher)
const TriggerAlgorithmalgorithm (const std::string &nameAlgorithm) const
TriggerConditionRefVector algorithmConditions (const std::string &nameAlgorithm) const
TriggerObjectRefVector algorithmObjects (const std::string &nameAlgorithm) const
 Get a vector of references to all objects, which were used in a certain algorithm given by name.
const TriggerAlgorithmRef algorithmRef (const std::string &nameAlgorithm) const
const TriggerAlgorithmRefVector algorithmRefs () const
const TriggerAlgorithmCollectionalgorithms () const
float bCurrentAvg () const
 Get the CMS magnet current averaged over run.
float bCurrentStart () const
 Get the CMS magnet current at start of run.
float bCurrentStop () const
 Get the CMS magnet current at end of run.
boost::uint16_t beamMode () const
 Get the LHC beam mode.
boost::uint16_t beamMomentum () const
 Get the LHC beam momentum.
boost::uint16_t bstMasterStatus () const
 Get the LHC master status.
const TriggerConditioncondition (const std::string &nameCondition) const
TriggerAlgorithmRefVector conditionAlgorithms (const TriggerConditionRef &conditionRef) const
 Get a vector of references to all algorithms, which have a certain condition assigned.
std::vector< std::string > conditionCollections (const std::string &nameAlgorithm) const
 Get a list of all trigger object collections used in a certain condition given by name.
bool conditionInAlgorithm (const TriggerConditionRef &conditionRef, const std::string &nameAlgorithm) const
 Checks, if a condition is assigned to a certain algorithm given by name.
TriggerObjectRefVector conditionObjects (const std::string &nameCondition) const
 Get a vector of references to all objects, which were used in a certain condition given by name.
const TriggerConditionRef conditionRef (const std::string &nameCondition) const
const TriggerConditionRefVector conditionRefs () const
const TriggerConditionCollectionconditions () const
const TriggerFilterfilter (const std::string &labelFilter) const
std::vector< std::string > filterCollections (const std::string &labelFilter) const
 Get a list of all trigger object collections used in a certain filter given by name.
bool filterInPath (const TriggerFilterRef &filterRef, const std::string &namePath, bool firing=true) const
 Checks, if a filter is assigned to and was run in a certain path given by name.
TriggerObjectRefVector filterObjects (const std::string &labelFilter) const
 Get a vector of references to all objects, which were used in a certain filter given by name.
TriggerPathRefVector filterPaths (const TriggerFilterRef &filterRef, bool firing=true) const
 Get a vector of references to all paths, which have a certain filter assigned.
const TriggerFilterRef filterRef (const std::string &labelFilter) const
const TriggerFilterRefVector filterRefs () const
const TriggerFilterCollectionfilters () const
unsigned indexAlgorithm (const std::string &nameAlgorithm) const
unsigned indexCondition (const std::string &nameCondition) const
unsigned indexFilter (const std::string &labelFilter) const
unsigned indexPath (const std::string &namePath) const
boost::uint32_t intensityBeam1 () const
 Get the LHC beam 1 intensity.
boost::uint32_t intensityBeam2 () const
 Get the LHC beam 2 intensity.
boost::uint32_t lhcFill () const
 Get the LHC fill number.
std::string nameAlgorithm (const unsigned bitAlgorithm, const bool techAlgorithm=true) const
std::string nameHltTable () const
 Get the name of the HLT trigger table.
std::string nameL1Menu () const
 Get the name of the L1 trigger menu.
TriggerAlgorithmRefVector objectAlgorithms (const TriggerObjectRef &objectRef) const
 Get a vector of references to all algorithms, which have a certain object assigned.
TriggerConditionRefVector objectConditions (const TriggerObjectRef &objectRef) const
 Get a vector of references to all conditions, which have a certain object assigned.
TriggerFilterRefVector objectFilters (const TriggerObjectRef &objectRef, bool firing=true) const
 Get a vector of references to all filters, which have a certain object assigned.
bool objectInAlgorithm (const TriggerObjectRef &objectRef, const std::string &nameAlgorithm) const
 Checks, if an object was used in a certain algorithm given by name.
bool objectInCondition (const TriggerObjectRef &objectRef, const std::string &nameCondition) const
 Checks, if an object was used in a certain condition given by name.
bool objectInFilter (const TriggerObjectRef &objectRef, const std::string &labelFilter) const
 Checks, if an object was used in a certain filter given by name.
bool objectInPath (const TriggerObjectRef &objectRef, const std::string &namePath, bool firing=true) const
 Checks, if an object was used in a certain path given by name.
TriggerPathRefVector objectPaths (const TriggerObjectRef &objectRef, bool firing=true) const
 Get a vector of references to all paths, which have a certain object assigned.
const TriggerObjectRefVector objectRefs () const
TriggerObjectRefVector objects (int triggerObjectType) const
const TriggerObjectCollectionobjects () const
TriggerObjectRefVector objects (trigger::TriggerObjectType triggerObjectType) const
 Get a vector of references to all trigger objects by trigger object type.
const TriggerPathpath (const std::string &namePath) const
TriggerFilterRefVector pathFilters (const std::string &namePath, bool firing=true) const
 Get a vector of references to all active HLT filters assigned to a certain path given by name.
TriggerFilterRefVector pathModules (const std::string &namePath, bool all=true) const
TriggerObjectRefVector pathObjects (const std::string &namePath, bool firing=true) const
 Get a vector of references to all objects, which were used in a certain path given by name.
const TriggerPathRef pathRef (const std::string &namePath) const
const TriggerPathRefVector pathRefs () const
const TriggerPathCollectionpaths () const
TriggerAlgorithmRefVector physAlgorithms () const
 Get a vector of references to all physics L1 algorithms.
void setAccept (bool accept)
 Set the success flag.
void setAlgorithms (const edm::Handle< TriggerAlgorithmCollection > &handleTriggerAlgorithms)
void setBCurrentAvg (float bCurrentAvg)
 Set the CMS magnet current averaged over run.
void setBCurrentStart (float bCurrentStart)
 Set the CMS magnet current at start of run.
void setBCurrentStop (float bCurrentStop)
 Set the CMS magnet current at end of run.
void setBeamMode (boost::uint16_t beamMode)
 Set the LHC beam mode.
void setBeamMomentum (boost::uint16_t beamMomentum)
 Set the LHC beam momentum.
void setBstMasterStatus (boost::uint16_t bstMasterStatus)
 Set the LHC master status.
void setConditions (const edm::Handle< TriggerConditionCollection > &handleTriggerConditions)
void setError (bool error)
 Set the error flag.
void setFilters (const edm::Handle< TriggerFilterCollection > &handleTriggerFilters)
void setIntensityBeam1 (boost::uint32_t intensityBeam1)
 Set the LHC beam 1 intensity.
void setIntensityBeam2 (boost::uint32_t intensityBeam2)
 Set the LHC beam 2 intensity.
void setLhcFill (boost::uint32_t lhcFill)
 Set the LHC fill number.
void setNameHltTable (const std::string &name)
 Set the name of the HLT trigger table.
void setNameL1Menu (const std::string &name)
 Methods.
void setObjects (const edm::Handle< TriggerObjectCollection > &handleTriggerObjects)
void setPaths (const edm::Handle< TriggerPathCollection > &handleTriggerPaths)
void setPhysDecl (bool physDecl)
 Set the PhysicsDeclared GT bit.
void setRun (bool run)
 Set the run flag.
void setTurnCount (boost::uint32_t turnCount)
 Set the LHC beam turn counter.
TriggerAlgorithmRefVector techAlgorithms () const
 Get a vector of references to all technical L1 algorithms.
 TriggerEvent (const std::string &nameL1Menu, const std::string &nameHltTable, bool run=true, bool accept=true, bool error=false, bool physDecl=true)
 Constructor from values, HLT and L1/GT.
 TriggerEvent (const std::string &nameHltTable, bool run=true, bool accept=true, bool error=false, bool physDecl=true)
 Constructor from values, HLT only.
 TriggerEvent ()
 Constructors and Desctructor.
std::vector< std::string > triggerMatchers () const
 Get a list of all linked trigger matches.
const TriggerObjectMatchtriggerObjectMatchResult (const std::string &labelMatcher) const
const TriggerObjectMatchContainertriggerObjectMatchResults () const
 Get all trigger matches.
boost::uint32_t turnCount () const
 Get the LHC beam turn counter.
bool wasAccept () const
 Get the success flag.
bool wasError () const
 Get the error flag.
bool wasPhysDecl () const
 Get the PhysicsDeclared GT bit.
bool wasRun () const
 Get the run flag.
virtual ~TriggerEvent ()
 Destructor.

Private Attributes

bool accept_
 Did HLT succeed?
TriggerAlgorithmRefProd algorithms_
float bCurrentAvg_
 CMS magnet current in ??? averaged over run.
float bCurrentStart_
 CMS magnet current in ??? at start of run.
float bCurrentStop_
 CMS magnet current in ??? at end of run.
boost::uint16_t beamMode_
boost::uint16_t beamMomentum_
 LHC beam momentum in GeV.
boost::uint16_t bstMasterStatus_
TriggerConditionRefProd conditions_
 Reference to pat::TriggerConditionCollection in event.
bool error_
 Was HLT in error?
TriggerFilterRefProd filters_
 Reference to pat::TriggerAlgorithmCollection in event.
boost::uint32_t intensityBeam1_
 LHC beam 1 intensity in ???
boost::uint32_t intensityBeam2_
 LHC beam 2 intensity in ???
boost::uint32_t lhcFill_
 LHC fill number.
std::string nameHltTable_
 Name of the HLT trigger table.
std::string nameL1Menu_
 Data Members.
TriggerObjectMatchContainer objectMatchResults_
 Table of references to pat::TriggerObjectMatch associations in event.
TriggerObjectRefProd objects_
 Reference to pat::TriggerObjectCollection in event.
TriggerPathRefProd paths_
 Reference to pat::TriggerPathCollection in event.
bool physDecl_
 PhysicsDeclared GT bit.
bool run_
 Was HLT run?
boost::uint32_t turnCount_
 LHC beam turn counter.

Detailed Description

Analysis-level trigger event class.

TriggerEvent implements a container for trigger event's information within the 'pat' namespace and provides the central entry point to all trigger information in the PAT. For detailed information, consult https://twiki.cern.ch/twiki/bin/view/CMS/SWGuidePATTrigger#TriggerEvent

Author:
Volker Adler
Version:
Id:
TriggerEvent.h,v 1.16 2011/11/30 13:42:55 vadler Exp

Definition at line 44 of file TriggerEvent.h.


Constructor & Destructor Documentation

TriggerEvent::TriggerEvent ( )

Constructors and Desctructor.

Default constructor

Definition at line 16 of file TriggerEvent.cc.

References objectMatchResults_.

TriggerEvent::TriggerEvent ( const std::string &  nameHltTable,
bool  run = true,
bool  accept = true,
bool  error = false,
bool  physDecl = true 
)

Constructor from values, HLT only.

Definition at line 39 of file TriggerEvent.cc.

References objectMatchResults_.

TriggerEvent::TriggerEvent ( const std::string &  nameL1Menu,
const std::string &  nameHltTable,
bool  run = true,
bool  accept = true,
bool  error = false,
bool  physDecl = true 
)

Constructor from values, HLT and L1/GT.

Definition at line 62 of file TriggerEvent.cc.

References objectMatchResults_.

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

Destructor.

Definition at line 109 of file TriggerEvent.h.

{};

Member Function Documentation

TriggerAlgorithmRefVector TriggerEvent::acceptedAlgorithms ( ) const

Get a vector of references to all succeeding L1 algorithms.

Definition at line 140 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( iAlgorithm->decision() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedAlgorithms;
}
TriggerAlgorithmRefVector TriggerEvent::acceptedAlgorithmsGtl ( ) const

Get a vector of references to all L1 algorithms succeeding on the GTL board.

Definition at line 155 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( iAlgorithm->gtlResult() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedAlgorithms;
}
TriggerConditionRefVector TriggerEvent::acceptedConditions ( ) const

Get a vector of references to all succeeding L1 condition.

Definition at line 302 of file TriggerEvent.cc.

References begin, conditionRef(), conditions(), conditions_, indexCondition(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerConditionRefVector theAcceptedConditions;
  for ( TriggerConditionCollection::const_iterator iCondition = conditions()->begin(); iCondition != conditions()->end(); ++iCondition ) {
    if ( iCondition->wasAccept() ) {
      const std::string nameCondition( iCondition->name() );
      const TriggerConditionRef conditionRef( conditions_, indexCondition( nameCondition ) );
      theAcceptedConditions.push_back( conditionRef );
    }
  }
  return theAcceptedConditions;
}
TriggerFilterRefVector TriggerEvent::acceptedFilters ( ) const

Get a vector of references to all succeeding HLT filters.

Definition at line 416 of file TriggerEvent.cc.

References begin, filterRef(), filters(), filters_, indexFilter(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerFilterRefVector theAcceptedFilters;
  for ( TriggerFilterCollection::const_iterator iFilter = filters()->begin(); iFilter != filters()->end(); ++iFilter ) {
    if ( iFilter->status() == 1 ) {
      const std::string labelFilter( iFilter->label() );
      const TriggerFilterRef filterRef( filters_, indexFilter( labelFilter ) );
      theAcceptedFilters.push_back( filterRef );
    }
  }
  return theAcceptedFilters;
}
TriggerPathRefVector TriggerEvent::acceptedPaths ( ) const

Get a vector of references to all succeeding HLT paths.

Definition at line 359 of file TriggerEvent.cc.

References begin, indexPath(), pathRef(), paths(), paths_, and edm::RefVector< C, T, F >::push_back().

{
  TriggerPathRefVector theAcceptedPaths;
  for ( TriggerPathCollection::const_iterator iPath = paths()->begin(); iPath != paths()->end(); ++iPath ) {
    if ( iPath->wasAccept() ) {
      const std::string namePath( iPath->name() );
      const TriggerPathRef pathRef( paths_, indexPath( namePath ) );
      theAcceptedPaths.push_back( pathRef );
    }
  }
  return theAcceptedPaths;
}
TriggerAlgorithmRefVector TriggerEvent::acceptedPhysAlgorithms ( ) const

Get a vector of references to all succeeding physics L1 algorithms.

Definition at line 230 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedPhysAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( ! iAlgorithm->techTrigger() && iAlgorithm->decision() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedPhysAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedPhysAlgorithms;
}
TriggerAlgorithmRefVector TriggerEvent::acceptedPhysAlgorithmsGtl ( ) const

Get a vector of references to all physics L1 algorithms succeeding on the GTL board.

Definition at line 245 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedPhysAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( ! iAlgorithm->techTrigger() && iAlgorithm->gtlResult() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedPhysAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedPhysAlgorithms;
}
TriggerAlgorithmRefVector TriggerEvent::acceptedTechAlgorithms ( ) const

Get a vector of references to all succeeding technical L1 algorithms.

Definition at line 185 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedTechAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( iAlgorithm->techTrigger() && iAlgorithm->decision() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedTechAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedTechAlgorithms;
}
TriggerAlgorithmRefVector TriggerEvent::acceptedTechAlgorithmsGtl ( ) const

Get a vector of references to all technical L1 algorithms succeeding on the GTL board.

Definition at line 200 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theAcceptedTechAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( iAlgorithm->techTrigger() && iAlgorithm->gtlResult() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theAcceptedTechAlgorithms.push_back( algorithmRef );
    }
  }
  return theAcceptedTechAlgorithms;
}
bool TriggerEvent::addObjectMatchResult ( const TriggerObjectMatchRefProd trigMatches,
const std::string &  labelMatcher 
)

Add a pat::TriggerObjectMatch association returns 'false', if 'matcher' alreadey exists

Definition at line 767 of file TriggerEvent.cc.

References end, spr::find(), objectMatchResults_, and triggerObjectMatchResults().

{
  if ( triggerObjectMatchResults()->find( labelMatcher ) == triggerObjectMatchResults()->end() ) {
    objectMatchResults_[ labelMatcher ] = trigMatches;
    return true;
  }
  return false;
}
bool pat::TriggerEvent::addObjectMatchResult ( const edm::Handle< TriggerObjectMatch > &  trigMatches,
const std::string &  labelMatcher 
) [inline]

Definition at line 343 of file TriggerEvent.h.

References addObjectMatchResult().

Referenced by addObjectMatchResult().

{ return addObjectMatchResult( TriggerObjectMatchRefProd( trigMatches ), labelMatcher ); };
bool pat::TriggerEvent::addObjectMatchResult ( const edm::OrphanHandle< TriggerObjectMatch > &  trigMatches,
const std::string &  labelMatcher 
) [inline]

Definition at line 344 of file TriggerEvent.h.

References addObjectMatchResult().

Referenced by addObjectMatchResult().

{ return addObjectMatchResult( TriggerObjectMatchRefProd( trigMatches ), labelMatcher ); };
const TriggerAlgorithm * TriggerEvent::algorithm ( const std::string &  nameAlgorithm) const

Get a pointer to a certain L1 algorithm by name, returns 0, if algorithm is not found

Definition at line 101 of file TriggerEvent.cc.

References algorithms(), and begin.

Referenced by algorithmConditions().

{
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( nameAlgorithm == iAlgorithm->name() ) return &*iAlgorithm;
  }
  return 0;
}
TriggerConditionRefVector TriggerEvent::algorithmConditions ( const std::string &  nameAlgorithm) const

L1 x-links Get a vector of references to all conditions assigned to a certain algorithm given by name

Definition at line 457 of file TriggerEvent.cc.

References algorithm(), asciidump::at, pat::TriggerAlgorithm::conditionKeys(), conditionRef(), conditions_, and edm::RefVector< C, T, F >::push_back().

Referenced by algorithmObjects(), conditionInAlgorithm(), and objectInAlgorithm().

{
  TriggerConditionRefVector theAlgorithmConditions;
  if ( algorithm( nameAlgorithm ) ) {
    for ( unsigned iC = 0; iC < algorithm( nameAlgorithm )->conditionKeys().size(); ++iC ) {
      const TriggerConditionRef conditionRef( conditions_, algorithm( nameAlgorithm )->conditionKeys().at( iC ) );
      theAlgorithmConditions.push_back( conditionRef );
    }
  }
  return theAlgorithmConditions;
}
TriggerObjectRefVector TriggerEvent::algorithmObjects ( const std::string &  nameAlgorithm) const

Get a vector of references to all objects, which were used in a certain algorithm given by name.

Definition at line 562 of file TriggerEvent.cc.

References algorithmConditions(), edm::RefVector< C, T, F >::begin(), conditionObjects(), edm::RefVector< C, T, F >::end(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerObjectRefVector    theAlgorithmObjects;
  TriggerConditionRefVector theConditions = algorithmConditions( nameAlgorithm );
  for ( TriggerConditionRefVectorIterator iCondition = theConditions.begin(); iCondition != theConditions.end(); ++iCondition ) {
    const std::string nameCondition( ( *iCondition )->name() );
    TriggerObjectRefVector theObjects = conditionObjects( nameCondition );
    for ( TriggerObjectRefVectorIterator iObject = theObjects.begin(); iObject != theObjects.end(); ++iObject ) {
      theAlgorithmObjects.push_back( *iObject );
    }
  }
  return theAlgorithmObjects;
}
const TriggerAlgorithmRef TriggerEvent::algorithmRef ( const std::string &  nameAlgorithm) const

Get a reference to a certain L1 algorithm by name, NULL, if algorithm is not found

Definition at line 111 of file TriggerEvent.cc.

References algorithmRefs(), begin, and edm::RefVector< C, T, F >::end().

Referenced by acceptedAlgorithms(), acceptedAlgorithmsGtl(), acceptedPhysAlgorithms(), acceptedPhysAlgorithmsGtl(), acceptedTechAlgorithms(), acceptedTechAlgorithmsGtl(), algorithmRefs(), conditionAlgorithms(), objectAlgorithms(), physAlgorithms(), and techAlgorithms().

{
  for ( TriggerAlgorithmRefVector::const_iterator iAlgorithm = algorithmRefs().begin(); iAlgorithm != algorithmRefs().end(); ++iAlgorithm ) {
    if ( nameAlgorithm == ( *iAlgorithm )->name() ) return *iAlgorithm;
  }
  return TriggerAlgorithmRef();
}
const TriggerAlgorithmRefVector TriggerEvent::algorithmRefs ( ) const

Get a vector of references to all L1 algorithms, empty, if RefProd is NULL

Definition at line 88 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

Referenced by algorithmRef().

{
  TriggerAlgorithmRefVector theAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    const std::string nameAlgorithm( iAlgorithm->name() );
    const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
    theAlgorithms.push_back( algorithmRef );
  }
  return theAlgorithms;
}
const TriggerAlgorithmCollection* pat::TriggerEvent::algorithms ( ) const [inline]
float pat::TriggerEvent::bCurrentAvg ( ) const [inline]

Get the CMS magnet current averaged over run.

Definition at line 177 of file TriggerEvent.h.

References bCurrentAvg_.

Referenced by setBCurrentAvg().

{ return bCurrentAvg_; };
float pat::TriggerEvent::bCurrentStart ( ) const [inline]

Get the CMS magnet current at start of run.

Definition at line 173 of file TriggerEvent.h.

References bCurrentStart_.

Referenced by setBCurrentStart().

{ return bCurrentStart_; };
float pat::TriggerEvent::bCurrentStop ( ) const [inline]

Get the CMS magnet current at end of run.

Definition at line 175 of file TriggerEvent.h.

References bCurrentStop_.

Referenced by setBCurrentStop().

{ return bCurrentStop_; };
boost::uint16_t pat::TriggerEvent::beamMode ( ) const [inline]

Get the LHC beam mode.

Definition at line 161 of file TriggerEvent.h.

References beamMode_.

Referenced by setBeamMode().

{ return beamMode_; };
boost::uint16_t pat::TriggerEvent::beamMomentum ( ) const [inline]

Get the LHC beam momentum.

Definition at line 163 of file TriggerEvent.h.

References beamMomentum_.

Referenced by setBeamMomentum().

{ return beamMomentum_; };
boost::uint16_t pat::TriggerEvent::bstMasterStatus ( ) const [inline]

Get the LHC master status.

Definition at line 169 of file TriggerEvent.h.

References bstMasterStatus_.

Referenced by setBstMasterStatus().

{ return bstMasterStatus_; };
const TriggerCondition * TriggerEvent::condition ( const std::string &  nameCondition) const

Get a pointer to a certain L1 condition by name, returns 0, if condition is not found

Definition at line 273 of file TriggerEvent.cc.

References begin, and conditions().

Referenced by conditionCollections(), conditionObjects(), and objectInCondition().

{
  for ( TriggerConditionCollection::const_iterator iCondition = conditions()->begin(); iCondition != conditions()->end(); ++iCondition ) {
    if ( nameCondition == iCondition->name() ) return &*iCondition;
  }
  return 0;
}
TriggerAlgorithmRefVector TriggerEvent::conditionAlgorithms ( const TriggerConditionRef conditionRef) const

Get a vector of references to all algorithms, which have a certain condition assigned.

Definition at line 482 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, conditionInAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theConditionAlgorithms;
  size_t cAlgorithms( 0 );
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    const std::string nameAlgorithm( iAlgorithm->name() );
    if ( conditionInAlgorithm( conditionRef, nameAlgorithm ) ) {
      const TriggerAlgorithmRef algorithmRef( algorithms_, cAlgorithms );
      theConditionAlgorithms.push_back( algorithmRef );
    }
    ++cAlgorithms;
  }
  return theConditionAlgorithms;
}
std::vector< std::string > TriggerEvent::conditionCollections ( const std::string &  nameAlgorithm) const

Get a list of all trigger object collections used in a certain condition given by name.

Definition at line 499 of file TriggerEvent.cc.

References asciidump::at, runEdmFileComparison::collection, condition(), newFWLiteAna::found, pat::TriggerCondition::hasObjectKey(), and objects().

{
  std::vector< std::string > theConditionCollections;
  if ( condition( nameCondition ) ) {
    for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
      if ( condition( nameCondition )->hasObjectKey( iObject ) ) {
        bool found( false );
        std::string objectCollection( objects()->at( iObject ).collection() );
        for ( std::vector< std::string >::const_iterator iC = theConditionCollections.begin(); iC != theConditionCollections.end(); ++iC ) {
          if ( *iC == objectCollection ) {
            found = true;
            break;
          }
        }
        if ( ! found ) {
          theConditionCollections.push_back( objectCollection );
        }
      }
    }
  }
  return theConditionCollections;
}
bool TriggerEvent::conditionInAlgorithm ( const TriggerConditionRef conditionRef,
const std::string &  nameAlgorithm 
) const

Checks, if a condition is assigned to a certain algorithm given by name.

Definition at line 471 of file TriggerEvent.cc.

References algorithmConditions(), edm::RefVector< C, T, F >::begin(), and edm::RefVector< C, T, F >::end().

Referenced by conditionAlgorithms().

{
  TriggerConditionRefVector theConditions = algorithmConditions( nameAlgorithm );
  for ( TriggerConditionRefVectorIterator iCondition = theConditions.begin(); iCondition != theConditions.end(); ++iCondition ) {
    if ( conditionRef == *iCondition ) return true;
  }
  return false;
}
TriggerObjectRefVector TriggerEvent::conditionObjects ( const std::string &  nameCondition) const

Get a vector of references to all objects, which were used in a certain condition given by name.

Definition at line 524 of file TriggerEvent.cc.

References condition(), pat::TriggerCondition::hasObjectKey(), objects(), objects_, and edm::RefVector< C, T, F >::push_back().

Referenced by algorithmObjects().

{
  TriggerObjectRefVector theConditionObjects;
  if ( condition( nameCondition ) ) {
    for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
      if ( condition( nameCondition )->hasObjectKey( iObject ) ) {
        const TriggerObjectRef objectRef( objects_, iObject );
        theConditionObjects.push_back( objectRef );
      }
    }
  }
  return theConditionObjects;
}
const TriggerConditionRef TriggerEvent::conditionRef ( const std::string &  nameCondition) const

Get a reference to a certain L1 condition by name, NULL, if condition is not found

Definition at line 283 of file TriggerEvent.cc.

References begin, conditionRefs(), and edm::RefVector< C, T, F >::end().

Referenced by acceptedConditions(), algorithmConditions(), conditionRefs(), and objectConditions().

{
  for ( TriggerConditionRefVector::const_iterator iCondition = conditionRefs().begin(); iCondition != conditionRefs().end(); ++iCondition ) {
    if ( nameCondition == ( *iCondition )->name() ) return *iCondition;
  }
  return TriggerConditionRef();
}
const TriggerConditionRefVector TriggerEvent::conditionRefs ( ) const

Get a vector of references to all L1 conditions, empty, if RefProd is NULL

Definition at line 260 of file TriggerEvent.cc.

References begin, conditionRef(), conditions(), conditions_, indexCondition(), and edm::RefVector< C, T, F >::push_back().

Referenced by conditionRef().

{
  TriggerConditionRefVector theConditions;
  for ( TriggerConditionCollection::const_iterator iCondition = conditions()->begin(); iCondition != conditions()->end(); ++iCondition ) {
    const std::string nameCondition( iCondition->name() );
    const TriggerConditionRef conditionRef( conditions_, indexCondition( nameCondition ) );
    theConditions.push_back( conditionRef );
  }
  return theConditions;
}
const TriggerConditionCollection* pat::TriggerEvent::conditions ( ) const [inline]

Get a pointer to all L1 condition, returns 0, if RefProd is NULL

Definition at line 222 of file TriggerEvent.h.

References conditions_, and edm::RefProd< C >::get().

Referenced by acceptedConditions(), condition(), conditionRefs(), indexCondition(), and objectConditions().

{ return conditions_.get(); };
const TriggerFilter * TriggerEvent::filter ( const std::string &  labelFilter) const

Get a pointer to a certain HLT filter by label, returns 0, if algorithm is not found

Definition at line 387 of file TriggerEvent.cc.

References begin, and filters().

Referenced by filterCollections(), filterObjects(), and objectInFilter().

{
  for ( TriggerFilterCollection::const_iterator iFilter = filters()->begin(); iFilter != filters()->end(); ++iFilter ) {
    if ( labelFilter == iFilter->label() ) return &*iFilter;
  }
  return 0;
}
std::vector< std::string > TriggerEvent::filterCollections ( const std::string &  labelFilter) const

Get a list of all trigger object collections used in a certain filter given by name.

Definition at line 662 of file TriggerEvent.cc.

References asciidump::at, runEdmFileComparison::collection, filter(), newFWLiteAna::found, pat::TriggerFilter::hasObjectKey(), and objects().

{
  std::vector< std::string > theFilterCollections;
  if ( filter( labelFilter ) ) {
    for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
      if ( filter( labelFilter )->hasObjectKey( iObject ) ) {
        bool found( false );
        std::string objectCollection( objects()->at( iObject ).collection() );
        for ( std::vector< std::string >::const_iterator iC = theFilterCollections.begin(); iC != theFilterCollections.end(); ++iC ) {
          if ( *iC == objectCollection ) {
            found = true;
            break;
          }
        }
        if ( ! found ) {
          theFilterCollections.push_back( objectCollection );
        }
      }
    }
  }
  return theFilterCollections;
}
bool TriggerEvent::filterInPath ( const TriggerFilterRef filterRef,
const std::string &  namePath,
bool  firing = true 
) const

Checks, if a filter is assigned to and was run in a certain path given by name.

Definition at line 634 of file TriggerEvent.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and pathFilters().

Referenced by filterPaths().

{
  TriggerFilterRefVector theFilters = pathFilters( namePath, firing );
  for ( TriggerFilterRefVectorIterator iFilter = theFilters.begin(); iFilter != theFilters.end(); ++iFilter ) {
    if ( filterRef == *iFilter ) return true;
  }
  return false;
}
TriggerObjectRefVector TriggerEvent::filterObjects ( const std::string &  labelFilter) const

Get a vector of references to all objects, which were used in a certain filter given by name.

Definition at line 687 of file TriggerEvent.cc.

References filter(), pat::TriggerFilter::hasObjectKey(), objects(), objects_, and edm::RefVector< C, T, F >::push_back().

Referenced by pathObjects().

{
  TriggerObjectRefVector theFilterObjects;
  if ( filter( labelFilter ) ) {
    for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
      if ( filter( labelFilter )->hasObjectKey( iObject ) ) {
        const TriggerObjectRef objectRef( objects_, iObject );
        theFilterObjects.push_back( objectRef );
      }
    }
  }
  return theFilterObjects;
}
TriggerPathRefVector TriggerEvent::filterPaths ( const TriggerFilterRef filterRef,
bool  firing = true 
) const

Get a vector of references to all paths, which have a certain filter assigned.

Definition at line 645 of file TriggerEvent.cc.

References begin, filterInPath(), pathRef(), paths(), paths_, and edm::RefVector< C, T, F >::push_back().

{
  TriggerPathRefVector theFilterPaths;
  size_t cPaths( 0 );
  for ( TriggerPathCollection::const_iterator iPath = paths()->begin(); iPath != paths()->end(); ++iPath ) {
    const std::string namePath( iPath->name() );
    if ( filterInPath( filterRef, namePath, firing ) ) {
      const TriggerPathRef pathRef( paths_, cPaths );
      theFilterPaths.push_back( pathRef );
    }
    ++cPaths;
  }
  return theFilterPaths;
}
const TriggerFilterRef TriggerEvent::filterRef ( const std::string &  labelFilter) const

Get a reference to a certain HLT filter by label, NULL, if filter is not found

Definition at line 397 of file TriggerEvent.cc.

References begin, edm::RefVector< C, T, F >::end(), and filterRefs().

Referenced by acceptedFilters(), filterRefs(), objectFilters(), pathFilters(), and pathModules().

{
  for ( TriggerFilterRefVector::const_iterator iFilter = filterRefs().begin(); iFilter != filterRefs().end(); ++iFilter ) {
    if ( labelFilter == ( *iFilter )->label() ) return *iFilter;
  }
  return TriggerFilterRef();
}
const TriggerFilterRefVector TriggerEvent::filterRefs ( ) const

Get a vector of references to all HLT filters, empty, if RefProd is NULL

Definition at line 374 of file TriggerEvent.cc.

References begin, filterRef(), filters(), filters_, indexFilter(), and edm::RefVector< C, T, F >::push_back().

Referenced by filterRef().

{
  TriggerFilterRefVector theFilters;
  for ( TriggerFilterCollection::const_iterator iFilter = filters()->begin(); iFilter != filters()->end(); ++iFilter ) {
    const std::string labelFilter( iFilter->label() );
    const TriggerFilterRef filterRef( filters_, indexFilter( labelFilter ) );
    theFilters.push_back( filterRef );
  }
  return theFilters;
}
const TriggerFilterCollection* pat::TriggerEvent::filters ( ) const [inline]

Get a pointer to all HLT filters, returns 0, if RefProd is NULL

Definition at line 264 of file TriggerEvent.h.

References filters_, and edm::RefProd< C >::get().

Referenced by acceptedFilters(), filter(), filterRefs(), indexFilter(), and objectFilters().

{ return filters_.get(); };
unsigned TriggerEvent::indexAlgorithm ( const std::string &  nameAlgorithm) const

Get the index of a certain L1 algorithm in the event collection by name, returns size of algorithm collection, if algorithm is not found

Definition at line 131 of file TriggerEvent.cc.

References algorithms(), asciidump::at, mergeVDriftHistosByStation::name, and findQualityFiles::size.

Referenced by acceptedAlgorithms(), acceptedAlgorithmsGtl(), acceptedPhysAlgorithms(), acceptedPhysAlgorithmsGtl(), acceptedTechAlgorithms(), acceptedTechAlgorithmsGtl(), algorithmRefs(), objectAlgorithms(), physAlgorithms(), and techAlgorithms().

{
  unsigned iAlgorithm( 0 );
  while ( iAlgorithm < algorithms()->size() && algorithms()->at( iAlgorithm ).name() != nameAlgorithm ) ++iAlgorithm;
  return iAlgorithm;
}
unsigned TriggerEvent::indexCondition ( const std::string &  nameCondition) const

Get the index of a certain L1 condition in the event collection by name, returns size of condition collection, if condition is not found

Definition at line 293 of file TriggerEvent.cc.

References asciidump::at, conditions(), mergeVDriftHistosByStation::name, and findQualityFiles::size.

Referenced by acceptedConditions(), conditionRefs(), and objectConditions().

{
  unsigned iCondition( 0 );
  while ( iCondition < conditions()->size() && conditions()->at( iCondition ).name() != nameCondition ) ++iCondition;
  return iCondition;
}
unsigned TriggerEvent::indexFilter ( const std::string &  labelFilter) const

Get the index of a certain HLT filter in the event collection by label, returns size of algorithm collection, if algorithm is not found

Definition at line 407 of file TriggerEvent.cc.

References asciidump::at, filters(), label, and findQualityFiles::size.

Referenced by acceptedFilters(), filterRefs(), objectFilters(), and pathModules().

{
  unsigned iFilter( 0 );
  while ( iFilter < filters()->size() && filters()->at( iFilter ).label() != labelFilter ) ++iFilter;
  return iFilter;
}
unsigned TriggerEvent::indexPath ( const std::string &  namePath) const

Get the index of a certain HLT path in the event collection by name, returns size of algorithm collection, if algorithm is not found

Definition at line 350 of file TriggerEvent.cc.

References asciidump::at, mergeVDriftHistosByStation::name, paths(), and findQualityFiles::size.

Referenced by acceptedPaths(), objectPaths(), and pathRefs().

{
  unsigned iPath( 0 );
  while ( iPath < paths()->size() && paths()->at( iPath ).name() != namePath ) ++iPath;
  return iPath;
}
boost::uint32_t pat::TriggerEvent::intensityBeam1 ( ) const [inline]

Get the LHC beam 1 intensity.

Definition at line 165 of file TriggerEvent.h.

References intensityBeam1_.

Referenced by setIntensityBeam1().

{ return intensityBeam1_; };
boost::uint32_t pat::TriggerEvent::intensityBeam2 ( ) const [inline]

Get the LHC beam 2 intensity.

Definition at line 167 of file TriggerEvent.h.

References intensityBeam2_.

Referenced by setIntensityBeam2().

{ return intensityBeam2_; };
boost::uint32_t pat::TriggerEvent::lhcFill ( ) const [inline]

Get the LHC fill number.

Definition at line 159 of file TriggerEvent.h.

References lhcFill_.

Referenced by setLhcFill().

{ return lhcFill_; };
std::string TriggerEvent::nameAlgorithm ( const unsigned  bitAlgorithm,
const bool  techAlgorithm = true 
) const

Get the name of a certain L1 algorithm in the event collection by bit number physics or technical (default) algorithms, returns empty string, if algorithm is not found

Definition at line 121 of file TriggerEvent.cc.

References algorithms(), and begin.

Referenced by acceptedAlgorithms(), acceptedAlgorithmsGtl(), acceptedPhysAlgorithms(), acceptedPhysAlgorithmsGtl(), acceptedTechAlgorithms(), acceptedTechAlgorithmsGtl(), algorithmRefs(), conditionAlgorithms(), objectAlgorithms(), physAlgorithms(), and techAlgorithms().

{
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( bitAlgorithm == iAlgorithm->bit() && techAlgorithm == iAlgorithm->techTrigger() ) return iAlgorithm->name();
  }
  return std::string( "" );
}
std::string pat::TriggerEvent::nameHltTable ( ) const [inline]

Get the name of the HLT trigger table.

Definition at line 149 of file TriggerEvent.h.

References nameHltTable_.

{ return nameHltTable_; };
std::string pat::TriggerEvent::nameL1Menu ( ) const [inline]

Get the name of the L1 trigger menu.

Definition at line 147 of file TriggerEvent.h.

References nameL1Menu_.

{ return nameL1Menu_; };
TriggerAlgorithmRefVector TriggerEvent::objectAlgorithms ( const TriggerObjectRef objectRef) const

Get a vector of references to all algorithms, which have a certain object assigned.

Definition at line 589 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), objectInAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theObjectAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    const std::string nameAlgorithm( iAlgorithm->name() );
    if ( objectInAlgorithm( objectRef, nameAlgorithm ) ) {
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theObjectAlgorithms.push_back( algorithmRef );
    }
  }
  return theObjectAlgorithms;
}
TriggerConditionRefVector TriggerEvent::objectConditions ( const TriggerObjectRef objectRef) const

Get a vector of references to all conditions, which have a certain object assigned.

Definition at line 547 of file TriggerEvent.cc.

References begin, conditionRef(), conditions(), conditions_, indexCondition(), objectInCondition(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerConditionRefVector theObjectConditions;
  for ( TriggerConditionCollection::const_iterator iCondition = conditions()->begin(); iCondition != conditions()->end(); ++iCondition ) {
    const std::string nameCondition( iCondition->name() );
    if ( objectInCondition( objectRef, nameCondition ) ) {
      const TriggerConditionRef conditionRef( conditions_, indexCondition( nameCondition ) );
      theObjectConditions.push_back( conditionRef );
    }
  }
  return theObjectConditions;
}
TriggerFilterRefVector TriggerEvent::objectFilters ( const TriggerObjectRef objectRef,
bool  firing = true 
) const

Get a vector of references to all filters, which have a certain object assigned.

Definition at line 710 of file TriggerEvent.cc.

References begin, filterRef(), filters(), filters_, indexFilter(), objectInFilter(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerFilterRefVector theObjectFilters;
  for ( TriggerFilterCollection::const_iterator iFilter = filters()->begin(); iFilter != filters()->end(); ++iFilter ) {
    const std::string labelFilter( iFilter->label() );
    if ( objectInFilter( objectRef, labelFilter ) ) {
      const TriggerFilterRef filterRef( filters_, indexFilter( labelFilter ) );
      if ( ( ! firing ) || iFilter->isFiring() ) theObjectFilters.push_back( filterRef );
    }
  }
  return theObjectFilters;
}
bool TriggerEvent::objectInAlgorithm ( const TriggerObjectRef objectRef,
const std::string &  nameAlgorithm 
) const

Checks, if an object was used in a certain algorithm given by name.

Definition at line 578 of file TriggerEvent.cc.

References algorithmConditions(), edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), and objectInCondition().

Referenced by objectAlgorithms().

{
  TriggerConditionRefVector theConditions = algorithmConditions( nameAlgorithm );
  for ( TriggerConditionRefVectorIterator iCondition = theConditions.begin(); iCondition != theConditions.end(); ++iCondition ) {
    if ( objectInCondition( objectRef, ( *iCondition )->name() ) ) return true;
  }
  return false;
}
bool TriggerEvent::objectInCondition ( const TriggerObjectRef objectRef,
const std::string &  nameCondition 
) const

Checks, if an object was used in a certain condition given by name.

Definition at line 540 of file TriggerEvent.cc.

References condition(), pat::TriggerCondition::hasObjectKey(), and edm::Ref< C, T, F >::key().

Referenced by objectConditions(), and objectInAlgorithm().

                                                                                                                {
  if ( condition( nameCondition ) ) return condition( nameCondition )->hasObjectKey( objectRef.key() );
  return false;
}
bool TriggerEvent::objectInFilter ( const TriggerObjectRef objectRef,
const std::string &  labelFilter 
) const

Checks, if an object was used in a certain filter given by name.

Definition at line 703 of file TriggerEvent.cc.

References filter(), pat::TriggerFilter::hasObjectKey(), and edm::Ref< C, T, F >::key().

Referenced by objectFilters(), and objectInPath().

                                                                                                           {
  if ( filter( labelFilter ) ) return filter( labelFilter )->hasObjectKey( objectRef.key() );
  return false;
}
bool TriggerEvent::objectInPath ( const TriggerObjectRef objectRef,
const std::string &  namePath,
bool  firing = true 
) const

Checks, if an object was used in a certain path given by name.

Definition at line 741 of file TriggerEvent.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), objectInFilter(), and pathFilters().

Referenced by objectPaths().

{
  TriggerFilterRefVector theFilters = pathFilters( namePath, firing );
  for ( TriggerFilterRefVectorIterator iFilter = theFilters.begin(); iFilter != theFilters.end(); ++iFilter ) {
    if ( objectInFilter( objectRef, ( *iFilter )->label() ) ) return true;
  }
  return false;
}
TriggerPathRefVector TriggerEvent::objectPaths ( const TriggerObjectRef objectRef,
bool  firing = true 
) const

Get a vector of references to all paths, which have a certain object assigned.

Definition at line 752 of file TriggerEvent.cc.

References begin, indexPath(), objectInPath(), pathRef(), paths(), paths_, and edm::RefVector< C, T, F >::push_back().

{
  TriggerPathRefVector theObjectPaths;
  for ( TriggerPathCollection::const_iterator iPath = paths()->begin(); iPath != paths()->end(); ++iPath ) {
    const std::string namePath( iPath->name() );
    if ( objectInPath( objectRef, namePath, firing ) ) {
      const TriggerPathRef pathRef( paths_, indexPath( namePath ) );
      theObjectPaths.push_back( pathRef );
    }
  }
  return theObjectPaths;
}
const TriggerObjectRefVector TriggerEvent::objectRefs ( ) const

Get a vector of references to all trigger objects, empty, if RefProd is NULL

Definition at line 431 of file TriggerEvent.cc.

References objects(), objects_, and edm::RefVector< C, T, F >::push_back().

{
  TriggerObjectRefVector theObjects;
  for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
    const TriggerObjectRef objectRef( objects_, iObject );
    theObjects.push_back( objectRef );
  }
  return theObjects;
}
TriggerObjectRefVector TriggerEvent::objects ( trigger::TriggerObjectType  triggerObjectType) const

Get a vector of references to all trigger objects by trigger object type.

Definition at line 443 of file TriggerEvent.cc.

References objects(), objects_, and edm::RefVector< C, T, F >::push_back().

{
  TriggerObjectRefVector theObjects;
  for ( unsigned iObject = 0; iObject < objects()->size(); ++iObject ) {
    if ( objects()->at( iObject ).hasTriggerObjectType( triggerObjectType ) ) {
      const TriggerObjectRef objectRef( objects_, iObject );
      theObjects.push_back( objectRef );
    }
  }
  return theObjects;
}
TriggerObjectRefVector pat::TriggerEvent::objects ( int  triggerObjectType) const [inline]

Definition at line 291 of file TriggerEvent.h.

References objects().

Referenced by objects().

{ return objects( trigger::TriggerObjectType( triggerObjectType ) ); }; // for backward compatibility
const TriggerObjectCollection* pat::TriggerEvent::objects ( ) const [inline]

Get a pointer to all trigger objects, returns 0, if RefProd is NULL

Definition at line 285 of file TriggerEvent.h.

References edm::RefProd< C >::get(), and objects_.

Referenced by conditionCollections(), conditionObjects(), filterCollections(), filterObjects(), objectRefs(), and objects().

{ return objects_.get(); };
const TriggerPath * TriggerEvent::path ( const std::string &  namePath) const

Get a pointer to a certain HLT path by name, returns 0, if algorithm is not found

Definition at line 330 of file TriggerEvent.cc.

References begin, and paths().

Referenced by WPlusJetsEventSelector::operator()(), pathFilters(), and pathModules().

{
  for ( TriggerPathCollection::const_iterator iPath = paths()->begin(); iPath != paths()->end(); ++iPath ) {
    if ( namePath == iPath->name() ) return &*iPath;
  }
  return 0;
}
TriggerFilterRefVector TriggerEvent::pathFilters ( const std::string &  namePath,
bool  firing = true 
) const

Get a vector of references to all active HLT filters assigned to a certain path given by name.

Definition at line 620 of file TriggerEvent.cc.

References asciidump::at, pat::TriggerPath::filterIndices(), filterRef(), filters_, path(), and edm::RefVector< C, T, F >::push_back().

Referenced by filterInPath(), objectInPath(), and pathObjects().

{
  TriggerFilterRefVector thePathFilters;
  if ( path( namePath ) ) {
    for ( unsigned iF = 0; iF < path( namePath )->filterIndices().size(); ++iF ) {
      const TriggerFilterRef filterRef( filters_, path( namePath )->filterIndices().at( iF ) );
      if ( ( ! firing ) || filterRef->isFiring() ) thePathFilters.push_back( filterRef );
    }
  }
  return thePathFilters;
}
TriggerFilterRefVector TriggerEvent::pathModules ( const std::string &  namePath,
bool  all = true 
) const

HLT x-links Get a vector of references to all modules assigned to a certain path given by name, setting 'all' to 'false' returns the run filters only.

Definition at line 604 of file TriggerEvent.cc.

References asciidump::at, filterRef(), filters_, indexFilter(), pat::TriggerPath::lastActiveFilterSlot(), pat::TriggerPath::modules(), path(), edm::RefVector< C, T, F >::push_back(), and findQualityFiles::size.

{
  TriggerFilterRefVector thePathFilters;
  if ( path( namePath ) && path( namePath )->modules().size() > 0 ) {
    const unsigned onePastLastFilter = all ? path( namePath )->modules().size() : path( namePath )->lastActiveFilterSlot() + 1;
    for ( unsigned iM = 0; iM < onePastLastFilter; ++iM ) {
      const std::string labelFilter( path( namePath )->modules().at( iM ) );
      const TriggerFilterRef filterRef( filters_, indexFilter( labelFilter ) );
      thePathFilters.push_back( filterRef );
    }
  }
  return thePathFilters;
}
TriggerObjectRefVector TriggerEvent::pathObjects ( const std::string &  namePath,
bool  firing = true 
) const

Get a vector of references to all objects, which were used in a certain path given by name.

Definition at line 725 of file TriggerEvent.cc.

References edm::RefVector< C, T, F >::begin(), edm::RefVector< C, T, F >::end(), filterObjects(), pathFilters(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerObjectRefVector thePathObjects;
  TriggerFilterRefVector theFilters = pathFilters( namePath, firing );
  for ( TriggerFilterRefVectorIterator iFilter = theFilters.begin(); iFilter != theFilters.end(); ++iFilter ) {
    const std::string labelFilter( ( *iFilter )->label() );
    TriggerObjectRefVector theObjects = filterObjects( labelFilter );
    for ( TriggerObjectRefVectorIterator iObject = theObjects.begin(); iObject != theObjects.end(); ++iObject ) {
      thePathObjects.push_back( *iObject );
    }
  }
  return thePathObjects;
}
const TriggerPathRef TriggerEvent::pathRef ( const std::string &  namePath) const

Get a reference to a certain HLT path by name, NULL, if path is not found

Definition at line 340 of file TriggerEvent.cc.

References begin, edm::RefVector< C, T, F >::end(), and pathRefs().

Referenced by acceptedPaths(), filterPaths(), objectPaths(), and pathRefs().

{
  for ( TriggerPathRefVector::const_iterator iPath = pathRefs().begin(); iPath != pathRefs().end(); ++iPath ) {
    if ( namePath == ( *iPath )->name() ) return *iPath;
  }
  return TriggerPathRef();
}
const TriggerPathRefVector TriggerEvent::pathRefs ( ) const

Get a vector of references to all HLT paths, empty, if RefProd is NULL

Definition at line 317 of file TriggerEvent.cc.

References begin, indexPath(), pathRef(), paths(), paths_, and edm::RefVector< C, T, F >::push_back().

Referenced by pathRef().

{
  TriggerPathRefVector thePaths;
  for ( TriggerPathCollection::const_iterator iPath = paths()->begin(); iPath != paths()->end(); ++iPath ) {
    const std::string namePath( iPath->name() );
    const TriggerPathRef pathRef( paths_, indexPath( namePath ) );
    thePaths.push_back( pathRef );
  }
  return thePaths;
}
const TriggerPathCollection* pat::TriggerEvent::paths ( ) const [inline]

Get a pointer to all HLT paths, returns 0, if RefProd is NULL

Definition at line 243 of file TriggerEvent.h.

References edm::RefProd< C >::get(), and paths_.

Referenced by acceptedPaths(), filterPaths(), indexPath(), objectPaths(), path(), and pathRefs().

{ return paths_.get(); };
TriggerAlgorithmRefVector TriggerEvent::physAlgorithms ( ) const

Get a vector of references to all physics L1 algorithms.

Definition at line 215 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector thePhysAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( ! iAlgorithm->techTrigger() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      thePhysAlgorithms.push_back( algorithmRef );
    }
  }
  return thePhysAlgorithms;
}
void pat::TriggerEvent::setAccept ( bool  accept) [inline]

Set the success flag.

Definition at line 121 of file TriggerEvent.h.

References accept(), and accept_.

{ accept_ = accept; };
void pat::TriggerEvent::setAlgorithms ( const edm::Handle< TriggerAlgorithmCollection > &  handleTriggerAlgorithms) [inline]

L1 algorithms Set the reference to the pat::TriggerAlgorithmCollection in the event

Definition at line 181 of file TriggerEvent.h.

References algorithms_.

{ algorithms_ = TriggerAlgorithmRefProd( handleTriggerAlgorithms ); };
void pat::TriggerEvent::setBCurrentAvg ( float  bCurrentAvg) [inline]

Set the CMS magnet current averaged over run.

Definition at line 145 of file TriggerEvent.h.

References bCurrentAvg(), and bCurrentAvg_.

void pat::TriggerEvent::setBCurrentStart ( float  bCurrentStart) [inline]

Set the CMS magnet current at start of run.

Definition at line 141 of file TriggerEvent.h.

References bCurrentStart(), and bCurrentStart_.

void pat::TriggerEvent::setBCurrentStop ( float  bCurrentStop) [inline]

Set the CMS magnet current at end of run.

Definition at line 143 of file TriggerEvent.h.

References bCurrentStop(), and bCurrentStop_.

void pat::TriggerEvent::setBeamMode ( boost::uint16_t  beamMode) [inline]

Set the LHC beam mode.

Definition at line 129 of file TriggerEvent.h.

References beamMode(), and beamMode_.

void pat::TriggerEvent::setBeamMomentum ( boost::uint16_t  beamMomentum) [inline]

Set the LHC beam momentum.

Definition at line 131 of file TriggerEvent.h.

References beamMomentum(), and beamMomentum_.

void pat::TriggerEvent::setBstMasterStatus ( boost::uint16_t  bstMasterStatus) [inline]

Set the LHC master status.

Definition at line 137 of file TriggerEvent.h.

References bstMasterStatus(), and bstMasterStatus_.

void pat::TriggerEvent::setConditions ( const edm::Handle< TriggerConditionCollection > &  handleTriggerConditions) [inline]

L1 conditions Set the reference to the pat::TriggerConditionCollection in the event

Definition at line 219 of file TriggerEvent.h.

References conditions_.

{ conditions_ = TriggerConditionRefProd( handleTriggerConditions ); };
void pat::TriggerEvent::setError ( bool  error) [inline]

Set the error flag.

Definition at line 123 of file TriggerEvent.h.

References error.

{ error = error; };
void pat::TriggerEvent::setFilters ( const edm::Handle< TriggerFilterCollection > &  handleTriggerFilters) [inline]

HLT filters Set the reference to the pat::TriggerFilterCollection in the event

Definition at line 261 of file TriggerEvent.h.

References filters_.

{ filters_ = TriggerFilterRefProd( handleTriggerFilters ); };
void pat::TriggerEvent::setIntensityBeam1 ( boost::uint32_t  intensityBeam1) [inline]

Set the LHC beam 1 intensity.

Definition at line 133 of file TriggerEvent.h.

References intensityBeam1(), and intensityBeam1_.

void pat::TriggerEvent::setIntensityBeam2 ( boost::uint32_t  intensityBeam2) [inline]

Set the LHC beam 2 intensity.

Definition at line 135 of file TriggerEvent.h.

References intensityBeam2(), and intensityBeam2_.

void pat::TriggerEvent::setLhcFill ( boost::uint32_t  lhcFill) [inline]

Set the LHC fill number.

Definition at line 127 of file TriggerEvent.h.

References lhcFill(), and lhcFill_.

{ lhcFill_  = lhcFill; };
void pat::TriggerEvent::setNameHltTable ( const std::string &  name) [inline]

Set the name of the HLT trigger table.

Definition at line 117 of file TriggerEvent.h.

References mergeVDriftHistosByStation::name, and nameHltTable_.

void pat::TriggerEvent::setNameL1Menu ( const std::string &  name) [inline]

Methods.

Trigger event Set the name of the L1 trigger menu

Definition at line 115 of file TriggerEvent.h.

References mergeVDriftHistosByStation::name, and nameL1Menu_.

{ nameL1Menu_  = name; };
void pat::TriggerEvent::setObjects ( const edm::Handle< TriggerObjectCollection > &  handleTriggerObjects) [inline]

Trigger objects Set the reference to the pat::TriggerObjectCollection in the event

Definition at line 282 of file TriggerEvent.h.

References objects_.

{ objects_ = TriggerObjectRefProd( handleTriggerObjects ); };
void pat::TriggerEvent::setPaths ( const edm::Handle< TriggerPathCollection > &  handleTriggerPaths) [inline]

HLT paths Set the reference to the pat::TriggerPathCollection in the event

Definition at line 240 of file TriggerEvent.h.

References paths_.

{ paths_ = TriggerPathRefProd( handleTriggerPaths ); };
void pat::TriggerEvent::setPhysDecl ( bool  physDecl) [inline]

Set the PhysicsDeclared GT bit.

Definition at line 125 of file TriggerEvent.h.

References physDecl_.

{ physDecl_ = physDecl; };
void pat::TriggerEvent::setRun ( bool  run) [inline]

Set the run flag.

Definition at line 119 of file TriggerEvent.h.

References DTTTrigCorrFirst::run, and run_.

{ run_ = run; };
void pat::TriggerEvent::setTurnCount ( boost::uint32_t  turnCount) [inline]

Set the LHC beam turn counter.

Definition at line 139 of file TriggerEvent.h.

References turnCount(), and turnCount_.

TriggerAlgorithmRefVector TriggerEvent::techAlgorithms ( ) const

Get a vector of references to all technical L1 algorithms.

Definition at line 170 of file TriggerEvent.cc.

References algorithmRef(), algorithms(), algorithms_, begin, indexAlgorithm(), nameAlgorithm(), and edm::RefVector< C, T, F >::push_back().

{
  TriggerAlgorithmRefVector theTechAlgorithms;
  for ( TriggerAlgorithmCollection::const_iterator iAlgorithm = algorithms()->begin(); iAlgorithm != algorithms()->end(); ++iAlgorithm ) {
    if ( iAlgorithm->techTrigger() ) {
      const std::string nameAlgorithm( iAlgorithm->name() );
      const TriggerAlgorithmRef algorithmRef( algorithms_, indexAlgorithm( nameAlgorithm ) );
      theTechAlgorithms.push_back( algorithmRef );
    }
  }
  return theTechAlgorithms;
}
std::vector< std::string > TriggerEvent::triggerMatchers ( ) const

Get a list of all linked trigger matches.

Definition at line 778 of file TriggerEvent.cc.

References begin, and triggerObjectMatchResults().

Referenced by pat::helper::TriggerMatchHelper::triggerMatchObjects().

{
  std::vector< std::string > theMatchers;
  for ( TriggerObjectMatchContainer::const_iterator iMatch = triggerObjectMatchResults()->begin(); iMatch != triggerObjectMatchResults()->end(); ++iMatch ) theMatchers.push_back( iMatch->first );
  return theMatchers;
}
const TriggerObjectMatch * TriggerEvent::triggerObjectMatchResult ( const std::string &  labelMatcher) const

Get a pointer to a certain trigger match given by label, performs proper "range check" (better than '(*triggerObjectMatchResults())[labelMatcher]'), returns 0, if matcher not found

Definition at line 787 of file TriggerEvent.cc.

References end, spr::find(), and triggerObjectMatchResults().

Referenced by pat::helper::TriggerMatchHelper::triggerMatchCandidates(), and pat::helper::TriggerMatchHelper::triggerMatchObject().

{
  const TriggerObjectMatchContainer::const_iterator iMatch( triggerObjectMatchResults()->find( labelMatcher ) );
  if ( iMatch != triggerObjectMatchResults()->end() ) return iMatch->second.get();
  return 0;
}
const TriggerObjectMatchContainer* pat::TriggerEvent::triggerObjectMatchResults ( ) const [inline]

Get all trigger matches.

Definition at line 348 of file TriggerEvent.h.

References objectMatchResults_.

Referenced by addObjectMatchResult(), triggerMatchers(), and triggerObjectMatchResult().

{ return &objectMatchResults_; };
boost::uint32_t pat::TriggerEvent::turnCount ( ) const [inline]

Get the LHC beam turn counter.

Definition at line 171 of file TriggerEvent.h.

References turnCount_.

Referenced by setTurnCount().

{ return turnCount_; };
bool pat::TriggerEvent::wasAccept ( ) const [inline]

Get the success flag.

Definition at line 153 of file TriggerEvent.h.

References accept_.

Referenced by WPlusJetsEventSelector::operator()().

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

Get the error flag.

Definition at line 155 of file TriggerEvent.h.

References error_.

{ return error_; };
bool pat::TriggerEvent::wasPhysDecl ( ) const [inline]

Get the PhysicsDeclared GT bit.

Definition at line 157 of file TriggerEvent.h.

References physDecl_.

{ return physDecl_; };
bool pat::TriggerEvent::wasRun ( ) const [inline]

Get the run flag.

Definition at line 151 of file TriggerEvent.h.

References run_.

Referenced by WPlusJetsEventSelector::operator()().

{ return run_; };

Member Data Documentation

Did HLT succeed?

Definition at line 55 of file TriggerEvent.h.

Referenced by setAccept(), and wasAccept().

CMS magnet current in ??? averaged over run.

Definition at line 81 of file TriggerEvent.h.

Referenced by bCurrentAvg(), and setBCurrentAvg().

CMS magnet current in ??? at start of run.

Definition at line 77 of file TriggerEvent.h.

Referenced by bCurrentStart(), and setBCurrentStart().

CMS magnet current in ??? at end of run.

Definition at line 79 of file TriggerEvent.h.

Referenced by bCurrentStop(), and setBCurrentStop().

boost::uint16_t pat::TriggerEvent::beamMode_ [private]

LHC beam mode as defined in https://bdidev1.cern.ch/bdisoft/operational/abbdisw_wiki/LHC/BST-config --> Beam mode.

Definition at line 64 of file TriggerEvent.h.

Referenced by beamMode(), and setBeamMode().

boost::uint16_t pat::TriggerEvent::beamMomentum_ [private]

LHC beam momentum in GeV.

Definition at line 66 of file TriggerEvent.h.

Referenced by beamMomentum(), and setBeamMomentum().

boost::uint16_t pat::TriggerEvent::bstMasterStatus_ [private]

LHC master status as defined in https://bdidev1.cern.ch/bdisoft/operational/abbdisw_wiki/LHC/BST-config

Definition at line 73 of file TriggerEvent.h.

Referenced by bstMasterStatus(), and setBstMasterStatus().

bool pat::TriggerEvent::error_ [private]

Was HLT in error?

Definition at line 57 of file TriggerEvent.h.

Referenced by wasError().

boost::uint32_t pat::TriggerEvent::intensityBeam1_ [private]

LHC beam 1 intensity in ???

Definition at line 68 of file TriggerEvent.h.

Referenced by intensityBeam1(), and setIntensityBeam1().

boost::uint32_t pat::TriggerEvent::intensityBeam2_ [private]

LHC beam 2 intensity in ???

Definition at line 70 of file TriggerEvent.h.

Referenced by intensityBeam2(), and setIntensityBeam2().

boost::uint32_t pat::TriggerEvent::lhcFill_ [private]

LHC fill number.

Definition at line 61 of file TriggerEvent.h.

Referenced by lhcFill(), and setLhcFill().

std::string pat::TriggerEvent::nameHltTable_ [private]

Name of the HLT trigger table.

Definition at line 51 of file TriggerEvent.h.

Referenced by nameHltTable(), and setNameHltTable().

std::string pat::TriggerEvent::nameL1Menu_ [private]

Data Members.

Name of the L1 trigger menu

Definition at line 49 of file TriggerEvent.h.

Referenced by nameL1Menu(), and setNameL1Menu().

Table of references to pat::TriggerObjectMatch associations in event.

Definition at line 95 of file TriggerEvent.h.

Referenced by addObjectMatchResult(), TriggerEvent(), and triggerObjectMatchResults().

Reference to pat::TriggerObjectCollection in event.

Definition at line 93 of file TriggerEvent.h.

Referenced by conditionObjects(), filterObjects(), objectRefs(), objects(), and setObjects().

Reference to pat::TriggerPathCollection in event.

Definition at line 89 of file TriggerEvent.h.

Referenced by acceptedPaths(), filterPaths(), objectPaths(), pathRefs(), paths(), and setPaths().

PhysicsDeclared GT bit.

Definition at line 59 of file TriggerEvent.h.

Referenced by setPhysDecl(), and wasPhysDecl().

bool pat::TriggerEvent::run_ [private]

Was HLT run?

Definition at line 53 of file TriggerEvent.h.

Referenced by setRun(), and wasRun().

boost::uint32_t pat::TriggerEvent::turnCount_ [private]

LHC beam turn counter.

Definition at line 75 of file TriggerEvent.h.

Referenced by setTurnCount(), and turnCount().