Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
canvas
canvas
Persistency
Common
HLTPathStatus.h
Go to the documentation of this file.
1
#ifndef canvas_Persistency_Common_HLTPathStatus_h
2
#define canvas_Persistency_Common_HLTPathStatus_h
3
// vim: set sw=2 expandtab :
4
5
//
6
// The status of a single HLT trigger (single trigger path consisting
7
// of modules on the path). Initially, the status is Ready (meaning
8
// that this trigger path has not run yet for this event). If all
9
// modules on the path pass (accept) the event, then the state is
10
// Pass. If any module on the path fails (rejects) the event, then
11
// the state of the whole trigger path is Fail. If any module on the
12
// path throws an unhandled error, then the trigger state is
13
// Exception. For the latter two cases, the Fw skips further
14
// processing of modules along this path, ie, path processing is
15
// aborted.
16
//
17
// The index of the module on the path, 0 to n-1 for a path with n
18
// modules issuing the decision for the path is recorded. For
19
// accepted events, this is simply the index of the last module on
20
// the path, ie, n-1.
21
//
22
// Note that n is limited, due to packing, to at most 2^(16-2)=16384.
23
//
24
25
#include "
canvas/Persistency/Common/HLTenums.h
"
26
27
#include <cstddef>
28
#include <cstdint>
29
30
namespace
art
{
31
class
HLTPathStatus
{
32
public
:
33
~HLTPathStatus
();
34
HLTPathStatus
();
35
explicit
HLTPathStatus
(
hlt::HLTState
const
state
);
36
explicit
HLTPathStatus
(
hlt::HLTState
const
state, std::size_t
const
index
);
37
38
// Get state of path.
39
hlt::HLTState
state
()
const
;
40
// Get index of module on path providing status.
41
// This will either be the index of the last module on the
42
// path, or the index of the module that rejected or threw.
43
unsigned
int
index
()
const
;
44
// Reset this path.
45
void
reset
();
46
// Was this path run?
47
bool
wasrun
()
const
;
48
// Has this path accepted the event? If the path was not run, the
49
// answer is true.
50
bool
accept
()
const
;
51
// has this path encountered an error (exception)?
52
bool
error
()
const
;
53
54
private
:
55
// packed status of trigger path
56
// bits 15:2 (0-16383): index of module on path making path decision
57
// bits 1:0 (0-3): HLT state
58
std::uint16_t
status_
{
hlt::Ready
};
59
};
60
61
}
// namespace art
62
63
#endif
/* canvas_Persistency_Common_HLTPathStatus_h */
64
65
// Local Variables:
66
// mode: c++
67
// End:
art::HLTPathStatus
Definition:
HLTPathStatus.h:31
art::HLTPathStatus::error
bool error() const
Definition:
HLTPathStatus.cc:63
art::HLTPathStatus::wasrun
bool wasrun() const
Definition:
HLTPathStatus.cc:51
art::hlt::HLTState
HLTState
Definition:
HLTenums.h:6
art::HLTPathStatus::reset
void reset()
Definition:
HLTPathStatus.cc:45
art::HLTPathStatus::~HLTPathStatus
~HLTPathStatus()
art::HLTPathStatus::index
unsigned int index() const
Definition:
HLTPathStatus.cc:39
art::hlt::Ready
Definition:
HLTenums.h:7
art::HLTPathStatus::HLTPathStatus
HLTPathStatus()
art::HLTPathStatus::accept
bool accept() const
Definition:
HLTPathStatus.cc:57
HLTenums.h
art
Definition:
BasicOptionsHandler.h:9
art::HLTPathStatus::status_
std::uint16_t status_
Definition:
HLTPathStatus.h:58
art::HLTPathStatus::state
hlt::HLTState state() const
Definition:
HLTPathStatus.cc:33
Generated by
1.8.11