LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
HLTPathStatus.h
Go to the documentation of this file.
1
#ifndef canvas_Persistency_Common_HLTPathStatus_h
2
#define canvas_Persistency_Common_HLTPathStatus_h
3
26
#include "
canvas/Persistency/Common/HLTenums.h
"
27
28
#include <cassert>
29
#include <cstdint>
30
31
namespace
art
{
32
class
HLTPathStatus
{
33
34
private
:
35
// packed status of trigger path [unsigned char is too small]
36
std::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
:
41
// constructor
42
HLTPathStatus
(
const
hlt::HLTState
state
=
hlt::Ready
,
43
const
unsigned
int
index
= 0)
44
: status_(
index
* 4 +
state
)
45
{
46
assert(
state
<
hlt::UNKNOWN
);
47
assert(
index
< 16384);
48
}
49
50
// get state of path
51
hlt::HLTState
52
state
()
const
53
{
54
return
(static_cast<hlt::HLTState>(status_ % 4));
55
}
56
// get index of module giving the status of this path
57
unsigned
int
58
index
()
const
59
{
60
return
(static_cast<unsigned int>(status_ / 4));
61
}
62
// reset this path
63
void
64
reset
()
65
{
66
status_ = 0;
67
}
68
69
// was this path run?
70
bool
71
wasrun
()
const
72
{
73
return
(
state
() !=
hlt::Ready
);
74
}
75
// has this path accepted the event? If the path was not run, the
76
// answer is, "yes."
77
bool
78
accept
()
const
79
{
80
return
((
state
() ==
hlt::Pass
) || !
wasrun
());
81
}
82
// has this path encountered an error (exception)?
83
bool
84
error
()
const
85
{
86
return
(
state
() ==
hlt::Exception
);
87
}
88
89
};
// HLTPathStatus
90
91
}
// art
92
93
// ======================================================================
94
95
#endif
/* canvas_Persistency_Common_HLTPathStatus_h */
96
97
// Local Variables:
98
// mode: c++
99
// End:
art::hlt::UNKNOWN
Definition:
HLTenums.h:19
art::HLTPathStatus
Definition:
HLTPathStatus.h:32
art::HLTPathStatus::error
bool error() const
Definition:
HLTPathStatus.h:84
art::HLTPathStatus::wasrun
bool wasrun() const
Definition:
HLTPathStatus.h:71
art::HLTPathStatus::HLTPathStatus
HLTPathStatus(const hlt::HLTState state=hlt::Ready, const unsigned int index=0)
Definition:
HLTPathStatus.h:42
art::hlt::HLTState
HLTState
status of a trigger path
Definition:
HLTenums.h:14
art::HLTPathStatus::reset
void reset()
Definition:
HLTPathStatus.h:64
art::hlt::Ready
not [yet] run
Definition:
HLTenums.h:15
art::hlt::Exception
error
Definition:
HLTenums.h:18
art::HLTPathStatus::index
unsigned int index() const
Definition:
HLTPathStatus.h:58
art::HLTPathStatus::accept
bool accept() const
Definition:
HLTPathStatus.h:78
HLTenums.h
art
HLT enums.
Definition:
ServiceProviderWrappers.h:36
art::HLTPathStatus::status_
std::uint16_t status_
Definition:
HLTPathStatus.h:36
art::hlt::Pass
accept
Definition:
HLTenums.h:16
art::HLTPathStatus::state
hlt::HLTState state() const
Definition:
HLTPathStatus.h:52
canvas
Persistency
Common
HLTPathStatus.h
Generated on Wed Dec 12 2018 14:42:35 for LArSoft by
1.8.11