test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HLTPathStatus.h
Go to the documentation of this file.
1 #ifndef DataFormats_Common_HLTPathStatus_h
2 #define DataFormats_Common_HLTPathStatus_h
3 
29 #include <boost/cstdint.hpp>
30 #include <cassert>
31 
32 namespace edm
33 {
34  class HLTPathStatus {
35 
36  private:
38  uint16_t status_;
39  // bits 0- 1 (0- 3): HLT state
40  // bits 2-16 (0-16383): index of module on path making path decision
41 
42  public:
44  HLTPathStatus(const hlt::HLTState state = hlt::Ready, const unsigned int index = 0)
45  : status_(index*4+state) {
46  assert (((int)state)<4);
47  assert (index<16384);
48  }
49 
51  hlt::HLTState state() const {return (static_cast<hlt::HLTState>(status_ % 4));}
55  unsigned int index() const {return (static_cast<unsigned int >(status_ / 4));}
57  void reset() {status_=0;}
58 
60  bool wasrun() const {return (state() != hlt::Ready);}
62  bool accept() const {return (state() == hlt::Pass);}
64  bool error() const {return (state() == hlt::Exception);}
65 
66  };
67 }
68 
69 #endif // DataFormats_Common_HLTPathStatus_h
not [yet] run
Definition: HLTenums.h:18
HLTPathStatus(const hlt::HLTState state=hlt::Ready, const unsigned int index=0)
constructor
Definition: HLTPathStatus.h:44
uint16_t status_
packed status of trigger path [unsigned char is too small]
Definition: HLTPathStatus.h:38
void reset()
reset this path
Definition: HLTPathStatus.h:57
bool wasrun() const
was this path run?
Definition: HLTPathStatus.h:60
HLTState
status of a trigger path
Definition: HLTenums.h:18
assert(m_qm.get())
accept
Definition: HLTenums.h:19
hlt::HLTState state() const
get state of path
Definition: HLTPathStatus.h:51
bool error() const
has this path encountered an error (exception)?
Definition: HLTPathStatus.h:64
bool accept() const
has this path accepted the event?
Definition: HLTPathStatus.h:62
unsigned int index() const
Definition: HLTPathStatus.h:55