CMS 3D CMS Logo

edm::HLTGlobalStatus Class Reference

The HLT global status, summarising the status of the individual HLT triggers, is implemented as a vector of HLTPathStatus objects. More...

#include <DataFormats/Common/interface/HLTGlobalStatus.h>

Inheritance diagram for edm::HLTGlobalStatus:

edm::TriggerResults

List of all members.

Public Member Functions

bool accept (const unsigned int i) const
 Has ith path accepted the event?
bool accept () const
 Has at least one path accepted the event?
HLTPathStatusat (const unsigned int i)
const HLTPathStatusat (const unsigned int i) const
bool error (const unsigned int i) const
 Has ith path encountered an error (exception)?
bool error () const
 Has any path encountered an error (exception).
 HLTGlobalStatus (const unsigned int n=0)
 Constructor - for n paths.
unsigned int index (const unsigned int i) const
 Get index (slot position) of module giving the decision of the ith path.
HLTGlobalStatusoperator= (HLTGlobalStatus const &rhs)
 copy assignment implemented with swap()
HLTPathStatusoperator[] (const unsigned int i)
const HLTPathStatusoperator[] (const unsigned int i) const
void reset (const unsigned int i)
 Reset the ith path.
void reset ()
 Reset status for all paths.
unsigned int size () const
 Get number of paths stored.
hlt::HLTState state (const unsigned int i) const
 Get status of ith path.
void swap (HLTGlobalStatus &other)
 swap function
bool wasrun (const unsigned int i) const
 Was ith path run?
bool wasrun () const
 Was at least one path run?

Private Member Functions

bool State (unsigned int icase) const
 Global state variable calculated on the fly.

Private Attributes

std::vector< HLTPathStatuspaths_
 Status of each HLT path.


Detailed Description

The HLT global status, summarising the status of the individual HLT triggers, is implemented as a vector of HLTPathStatus objects.

If the user wants map-like indexing of HLT triggers through their names as key, s/he must use the TriggerNamesService.

Date
2007/12/21 22:46:50
Revision
1.8

Author:
Martin Grunewald

Definition at line 28 of file HLTGlobalStatus.h.


Constructor & Destructor Documentation

edm::HLTGlobalStatus::HLTGlobalStatus ( const unsigned int  n = 0  )  [inline]

Constructor - for n paths.

Definition at line 38 of file HLTGlobalStatus.h.

00038 : paths_(n) {}


Member Function Documentation

bool edm::HLTGlobalStatus::accept ( const unsigned int  i  )  const [inline]

Has ith path accepted the event?

Definition at line 68 of file HLTGlobalStatus.h.

References edm::HLTPathStatus::accept(), and at().

00068 { return at(i).accept(); }

bool edm::HLTGlobalStatus::accept (  )  const [inline]

Has at least one path accepted the event?

Definition at line 54 of file HLTGlobalStatus.h.

References State().

Referenced by CaloMETAnalyzer::analyze(), and VisTriggerResultsTwig::onNewEvent().

00054 {return State(1);}

HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i  )  [inline]

Definition at line 61 of file HLTGlobalStatus.h.

References paths_.

00061 { return paths_.at(i); }

const HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i  )  const [inline]

Definition at line 60 of file HLTGlobalStatus.h.

References paths_.

Referenced by accept(), error(), index(), reset(), state(), and wasrun().

00060 { return paths_.at(i); }

bool edm::HLTGlobalStatus::error ( const unsigned int  i  )  const [inline]

Has ith path encountered an error (exception)?

Definition at line 70 of file HLTGlobalStatus.h.

References at(), and edm::HLTPathStatus::error().

00070 { return at(i).error() ; }

bool edm::HLTGlobalStatus::error (  )  const [inline]

Has any path encountered an error (exception).

Definition at line 56 of file HLTGlobalStatus.h.

References State().

Referenced by VisTriggerResultsTwig::onNewEvent().

00056 {return State(2);}

unsigned int edm::HLTGlobalStatus::index ( const unsigned int  i  )  const [inline]

Get index (slot position) of module giving the decision of the ith path.

Definition at line 75 of file HLTGlobalStatus.h.

References at(), and edm::HLTPathStatus::index().

00075 { return at(i).index(); }

HLTGlobalStatus& edm::HLTGlobalStatus::operator= ( HLTGlobalStatus const &  rhs  )  [inline]

copy assignment implemented with swap()

Definition at line 81 of file HLTGlobalStatus.h.

References swap(), and pyDBSRunClass::temp.

00081                                                            {
00082       HLTGlobalStatus temp(rhs);
00083       this->swap(temp);
00084       return *this;
00085     }

HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i  )  [inline]

Definition at line 63 of file HLTGlobalStatus.h.

References paths_.

00063 { return paths_.at(i); }

const HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i  )  const [inline]

Definition at line 62 of file HLTGlobalStatus.h.

References paths_.

00062 { return paths_.at(i); }

void edm::HLTGlobalStatus::reset ( const unsigned int  i  )  [inline]

Reset the ith path.

Definition at line 77 of file HLTGlobalStatus.h.

References at(), and edm::HLTPathStatus::reset().

00077 { at(i).reset(); }

void edm::HLTGlobalStatus::reset ( void   )  [inline]

Reset status for all paths.

Definition at line 44 of file HLTGlobalStatus.h.

References i, n, paths_, and size().

Referenced by edm::EventSelector::selectionIsValid().

00044                  {
00045       const unsigned int n(size());
00046       for (unsigned int i = 0; i != n; ++i) paths_[i].reset();
00047     }

unsigned int edm::HLTGlobalStatus::size ( void   )  const [inline]

Get number of paths stored.

Definition at line 41 of file HLTGlobalStatus.h.

References paths_.

Referenced by CaloMETAnalyzer::analyze(), edm::EventSelector::containsExceptions(), edm::TriggerResults::find(), edm::service::TriggerNamesService::getTrigPaths(), HLTHighLevel::init(), edm::EventSelector::maskTriggerResults(), edm::operator<<(), reset(), and State().

00041 { return paths_.size(); }

bool edm::HLTGlobalStatus::State ( unsigned int  icase  )  const [inline, private]

Global state variable calculated on the fly.

Definition at line 90 of file HLTGlobalStatus.h.

References edm::hlt::Exception, flags, i, n, edm::hlt::Pass, edm::hlt::Ready, s, size(), and state().

Referenced by accept(), error(), and wasrun().

00090                                          {
00091       bool flags[3] = {false, false, false};
00092       const unsigned int n(size());
00093       for (unsigned int i = 0; i != n; ++i) {
00094         const hlt::HLTState s(state(i));
00095         if (s!=hlt::Ready) {
00096           flags[0]=true;       // at least one trigger was run
00097           if (s==hlt::Pass) {
00098             flags[1]=true;     // at least one trigger accepted
00099           } else if (s==hlt::Exception) {
00100             flags[2]=true;     // at least one trigger with error
00101           }
00102         }
00103       }
00104       return flags[icase];
00105     }

hlt::HLTState edm::HLTGlobalStatus::state ( const unsigned int  i  )  const [inline]

Get status of ith path.

Definition at line 73 of file HLTGlobalStatus.h.

References at(), and edm::HLTPathStatus::state().

Referenced by edm::EventSelector::acceptAllBits(), edm::EventSelector::acceptOneBit(), edm::EventSelector::maskTriggerResults(), edm::operator<<(), and State().

00073 { return at(i).state(); }

void edm::HLTGlobalStatus::swap ( HLTGlobalStatus other  )  [inline]

swap function

Definition at line 79 of file HLTGlobalStatus.h.

References paths_.

Referenced by operator=(), edm::swap(), and std::swap().

00079 { paths_.swap(other.paths_); }

bool edm::HLTGlobalStatus::wasrun ( const unsigned int  i  )  const [inline]

Was ith path run?

Definition at line 66 of file HLTGlobalStatus.h.

References at(), and edm::HLTPathStatus::wasrun().

00066 { return at(i).wasrun(); }

bool edm::HLTGlobalStatus::wasrun (  )  const [inline]

Was at least one path run?

Definition at line 52 of file HLTGlobalStatus.h.

References State().

Referenced by VisTriggerResultsTwig::onNewEvent().

00052 {return State(0);}


Member Data Documentation

std::vector<HLTPathStatus> edm::HLTGlobalStatus::paths_ [private]

Status of each HLT path.

Definition at line 33 of file HLTGlobalStatus.h.

Referenced by at(), operator[](), reset(), size(), and swap().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:41:14 2009 for CMSSW by  doxygen 1.5.4