DataFormats
Common
interface
HLTPathStatus.h
Go to the documentation of this file.
1
#ifndef DataFormats_Common_HLTPathStatus_h
2
#define DataFormats_Common_HLTPathStatus_h
3
28
#include "
DataFormats/Common/interface/HLTenums.h
"
29
#include <cassert>
30
#include <cstdint>
31
32
namespace
edm
{
33
class
HLTPathStatus
{
34
private
:
36
uint16_t
status_
;
37
// bits 0- 1 (0- 3): HLT state
38
// bits 2-16 (0-16383): index of module on path making path decision
39
40
public
:
42
HLTPathStatus
(
const
hlt::HLTState
state
=
hlt::Ready
,
const
unsigned
int
index
= 0) :
status_
(
index
* 4 +
state
) {
43
assert
(((
int
)
state
) < 4);
44
assert
(
index
< 16384);
45
}
46
48
hlt::HLTState
state
()
const
{
return
(static_cast<hlt::HLTState>(
status_
% 4)); }
52
unsigned
int
index
()
const
{
return
(static_cast<unsigned int>(
status_
/ 4)); }
54
void
reset
() {
status_
= 0; }
55
57
bool
wasrun
()
const
{
return
(
state
() !=
hlt::Ready
); }
59
bool
accept
()
const
{
return
(
state
() ==
hlt::Pass
); }
61
bool
error
()
const
{
return
(
state
() ==
hlt::Exception
); }
62
};
63
}
// namespace edm
64
65
#endif // DataFormats_Common_HLTPathStatus_h
edm::HLTPathStatus::error
bool error() const
has this path encountered an error (exception)?
Definition:
HLTPathStatus.h:61
edm::hlt::HLTState
HLTState
status of a trigger path
Definition:
HLTenums.h:16
edm
HLT enums.
Definition:
AlignableModifier.h:19
cms::cuda::assert
assert(be >=bs)
edm::HLTPathStatus::accept
bool accept() const
has this path accepted the event?
Definition:
HLTPathStatus.h:59
edm::HLTPathStatus
Definition:
HLTPathStatus.h:33
edm::HLTPathStatus::status_
uint16_t status_
packed status of trigger path [unsigned char is too small]
Definition:
HLTPathStatus.h:36
edm::hlt::Ready
not [yet] run
Definition:
HLTenums.h:17
edm::HLTPathStatus::reset
void reset()
reset this path
Definition:
HLTPathStatus.h:54
edm::HLTPathStatus::index
unsigned int index() const
Definition:
HLTPathStatus.h:52
edm::HLTPathStatus::HLTPathStatus
HLTPathStatus(const hlt::HLTState state=hlt::Ready, const unsigned int index=0)
constructor
Definition:
HLTPathStatus.h:42
HLTenums.h
edm::hlt::Exception
error
Definition:
HLTenums.h:20
edm::hlt::Pass
accept
Definition:
HLTenums.h:18
edm::HLTPathStatus::wasrun
bool wasrun() const
was this path run?
Definition:
HLTPathStatus.h:57
edm::HLTPathStatus::state
hlt::HLTState state() const
get state of path
Definition:
HLTPathStatus.h:48
Generated for CMSSW Reference Manual by
1.8.16