CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

edm::HLTGlobalStatus Class Reference

#include <HLTGlobalStatus.h>

Inheritance diagram for edm::HLTGlobalStatus:
edm::TriggerResults

List of all members.

Public Member Functions

bool accept () const
 Has at least one path accepted the event?
bool accept (const unsigned int i) const
 Has ith 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
 Was at least one path run?
bool wasrun (const unsigned int i) const
 Was ith 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.

: paths_(n) {}

Member Function Documentation

bool edm::HLTGlobalStatus::accept ( ) const [inline]
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().

{ return at(i).accept(); }
const HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i) const [inline]
HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i) [inline]

Definition at line 61 of file HLTGlobalStatus.h.

References paths_.

{ return paths_.at(i); }
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 edm::TriggerResultsByName::error().

{return State(2);}
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().

{ return at(i).error() ; }
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().

Referenced by edm::TriggerResultsByName::index().

{ 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 groupFilesInBlocks::temp.

                                                           {
      HLTGlobalStatus temp(rhs);
      this->swap(temp);
      return *this;
    }
const HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i) const [inline]

Definition at line 62 of file HLTGlobalStatus.h.

References paths_.

{ return paths_.at(i); }
HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i) [inline]

Definition at line 63 of file HLTGlobalStatus.h.

References paths_.

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

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

                 {
      const unsigned int n(size());
      for (unsigned int i = 0; i != n; ++i) paths_[i].reset();
    }
unsigned int edm::HLTGlobalStatus::size ( void  ) const [inline]
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, alignCSCRings::s, size(), and state().

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

                                         {
      bool flags[3] = {false, false, false};
      const unsigned int n(size());
      for (unsigned int i = 0; i != n; ++i) {
        const hlt::HLTState s(state(i));
        if (s!=hlt::Ready) {
          flags[0]=true;       // at least one trigger was run
          if (s==hlt::Pass) {
            flags[1]=true;     // at least one trigger accepted
          } else if (s==hlt::Exception) {
            flags[2]=true;     // at least one trigger with error
          }
        }
      }
      return flags[icase];
    }
hlt::HLTState edm::HLTGlobalStatus::state ( const unsigned int  i) const [inline]
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().

{ paths_.swap(other.paths_); }
bool edm::HLTGlobalStatus::wasrun ( ) const [inline]

Was at least one path run?

Definition at line 52 of file HLTGlobalStatus.h.

References State().

Referenced by edm::TriggerResultsByName::wasrun().

{return State(0);}
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().

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

Member Data Documentation

Status of each HLT path.

Definition at line 33 of file HLTGlobalStatus.h.

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