CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
edm::HLTGlobalStatus Class Reference

#include <HLTGlobalStatus.h>

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

Public Member Functions

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

Private Member Functions

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

Private Attributes

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

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.

38 : paths_(n) {}
std::vector< HLTPathStatus > paths_
Status of each HLT path.

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

Referenced by Vispa.Gui.BoxContentDialog.BoxContentDialog::apply(), and Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog::apply().

68 { return at(i).accept(); }
int i
Definition: DBlmapReader.cc:9
const HLTPathStatus & at(const unsigned int i) const
bool accept() const
has this path accepted the event?
Definition: HLTPathStatus.h:63
const HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i) const
inline

Definition at line 60 of file HLTGlobalStatus.h.

References paths_.

Referenced by accept(), edm::TriggerResultsByName::at(), error(), index(), edm::TriggerResultsByName::operator[](), reset(), state(), and wasrun().

60 { return paths_.at(i); }
int i
Definition: DBlmapReader.cc:9
std::vector< HLTPathStatus > paths_
Status of each HLT path.
HLTPathStatus& edm::HLTGlobalStatus::at ( const unsigned int  i)
inline

Definition at line 61 of file HLTGlobalStatus.h.

References paths_.

61 { return paths_.at(i); }
int i
Definition: DBlmapReader.cc:9
std::vector< HLTPathStatus > paths_
Status of each HLT path.
bool edm::HLTGlobalStatus::error ( ) const
inline
bool edm::HLTGlobalStatus::error ( const unsigned int  i) const
inline
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 BeautifulSoup.PageElement::_invert(), and edm::TriggerResultsByName::index().

75 { return at(i).index(); }
int i
Definition: DBlmapReader.cc:9
const HLTPathStatus & at(const unsigned int i) const
unsigned int index() const
get index of module giving the status of this path
Definition: HLTPathStatus.h:56
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.

81  {
82  HLTGlobalStatus temp(rhs);
83  this->swap(temp);
84  return *this;
85  }
void swap(HLTGlobalStatus &other)
swap function
HLTGlobalStatus(const unsigned int n=0)
Constructor - for n paths.
const HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i) const
inline

Definition at line 62 of file HLTGlobalStatus.h.

References paths_.

62 { return paths_.at(i); }
int i
Definition: DBlmapReader.cc:9
std::vector< HLTPathStatus > paths_
Status of each HLT path.
HLTPathStatus& edm::HLTGlobalStatus::operator[] ( const unsigned int  i)
inline

Definition at line 63 of file HLTGlobalStatus.h.

References paths_.

63 { return paths_.at(i); }
int i
Definition: DBlmapReader.cc:9
std::vector< HLTPathStatus > paths_
Status of each HLT path.
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().

44  {
45  const unsigned int n(size());
46  for (unsigned int i = 0; i != n; ++i) paths_[i].reset();
47  }
int i
Definition: DBlmapReader.cc:9
void reset()
Reset status for all paths.
unsigned int size() const
Get number of paths stored.
std::vector< HLTPathStatus > paths_
Status of each HLT path.
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().

77 { at(i).reset(); }
int i
Definition: DBlmapReader.cc:9
void reset()
reset this path
Definition: HLTPathStatus.h:58
const HLTPathStatus & at(const unsigned int i) const
unsigned int edm::HLTGlobalStatus::size ( void  ) const
inline
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<<(), edm::TriggerResultsByName::state(), and State().

73 { return at(i).state(); }
int i
Definition: DBlmapReader.cc:9
hlt::HLTState state() const
get state of path
Definition: HLTPathStatus.h:54
const HLTPathStatus & at(const unsigned int i) const
bool edm::HLTGlobalStatus::State ( unsigned int  icase) const
inlineprivate

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

90  {
91  bool flags[3] = {false, false, false};
92  const unsigned int n(size());
93  for (unsigned int i = 0; i != n; ++i) {
94  const hlt::HLTState s(state(i));
95  if (s!=hlt::Ready) {
96  flags[0]=true; // at least one trigger was run
97  if (s==hlt::Pass) {
98  flags[1]=true; // at least one trigger accepted
99  } else if (s==hlt::Exception) {
100  flags[2]=true; // at least one trigger with error
101  }
102  }
103  }
104  return flags[icase];
105  }
int i
Definition: DBlmapReader.cc:9
not [yet] run
Definition: HLTenums.h:21
HLTState
status of a trigger path
Definition: HLTenums.h:21
std::vector< Variable::Flags > flags
Definition: MVATrainer.cc:135
accept
Definition: HLTenums.h:22
unsigned int size() const
Get number of paths stored.
hlt::HLTState state(const unsigned int i) const
Get status of ith path.
void edm::HLTGlobalStatus::swap ( HLTGlobalStatus other)
inline

swap function

Definition at line 79 of file HLTGlobalStatus.h.

References paths_.

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

79 { paths_.swap(other.paths_); }
std::vector< HLTPathStatus > paths_
Status of each HLT path.
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().

52 {return State(0);}
bool State(unsigned int icase) const
Global state variable calculated on the fly.
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().

66 { return at(i).wasrun(); }
int i
Definition: DBlmapReader.cc:9
bool wasrun() const
was this path run?
Definition: HLTPathStatus.h:61
const HLTPathStatus & at(const unsigned int i) const

Member Data Documentation

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