DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
trigger
include
trigger
Set.hpp
Go to the documentation of this file.
1
9
#ifndef TRIGGER_INCLUDE_TRIGGER_SET_HPP_
10
#define TRIGGER_INCLUDE_TRIGGER_SET_HPP_
11
12
#include "
daqdataformats/SourceID.hpp
"
13
#include "
daqdataformats/Types.hpp
"
14
#include "
trgdataformats/Types.hpp
"
15
16
#include <cstdint>
17
#include <vector>
18
19
namespace
dunedaq::trigger
{
20
24
template
<
class
T>
25
class
Set
26
{
27
public
:
28
using
element_t
= T;
29
using
origin_t
=
daqdataformats::SourceID
;
30
using
timestamp_t
=
daqdataformats::timestamp_t
;
31
32
enum
Type
33
{
34
kUnknown
= 0,
35
kPayload
= 1,
36
kHeartbeat
= 2
37
};
38
39
// An incremental count of how many Sets have been produced by this source
40
// At TPSet rates seen in one protodune felix link, 32bits overflows in a week.
41
using
seqno_t
= uint64_t;
// NOLINT(build/unsigned)
42
seqno_t
seqno
{ 0 };
43
44
// The current run number
45
daqdataformats::run_number_t
run_number
{ 0 };
46
47
// Identify the instance creator/stream/source of this set.
48
origin_t
origin
{
daqdataformats::SourceID
(
daqdataformats::SourceID::Subsystem::kTrigger
,
49
daqdataformats::SourceID::s_invalid_id
) };
50
51
// Whether this Set is a regular bag-of-objects or a heartbeat
52
Type
type{
kUnknown
};
53
54
// The earliest timestamp inspected to form this Set
55
timestamp_t
start_time
{ 0 };
56
57
// The latest timestamp inspected to form this Set
58
timestamp_t
end_time
{ 0 };
59
60
// The TPs/TAs themselves. Needs a better name!
61
std::vector<T>
objects
;
62
};
63
64
}
// namespace dunedaq::trigger
65
66
#endif
// TRIGGER_INCLUDE_TRIGGER_SET_HPP_
67
68
// Local Variables:
69
// c-basic-offset: 2
70
// End:
SourceID.hpp
dunedaq::trigger::Set
A set of TPs or TAs in a given time window, defined by its start and end times.
Definition
Set.hpp:26
dunedaq::trigger::Set::objects
std::vector< T > objects
Definition
Set.hpp:61
dunedaq::trigger::Set::run_number
daqdataformats::run_number_t run_number
Definition
Set.hpp:45
dunedaq::trigger::Set::start_time
timestamp_t start_time
Definition
Set.hpp:55
dunedaq::trigger::Set::origin
origin_t origin
Definition
Set.hpp:48
dunedaq::trigger::Set::timestamp_t
daqdataformats::timestamp_t timestamp_t
Definition
Set.hpp:30
dunedaq::trigger::Set::element_t
T element_t
Definition
Set.hpp:28
dunedaq::trigger::Set::seqno_t
uint64_t seqno_t
Definition
Set.hpp:41
dunedaq::trigger::Set::Type
Type
Definition
Set.hpp:33
dunedaq::trigger::Set::kHeartbeat
@ kHeartbeat
Definition
Set.hpp:36
dunedaq::trigger::Set::kUnknown
@ kUnknown
Definition
Set.hpp:34
dunedaq::trigger::Set::kPayload
@ kPayload
Definition
Set.hpp:35
dunedaq::trigger::Set::seqno
seqno_t seqno
Definition
Set.hpp:42
dunedaq::trigger::Set::end_time
timestamp_t end_time
Definition
Set.hpp:58
Types.hpp
dunedaq::daqdataformats::run_number_t
uint32_t run_number_t
Type used to represent run number.
Definition
Types.hpp:20
dunedaq::daqdataformats::timestamp_t
uint64_t timestamp_t
Type used to represent DUNE timing system timestamps.
Definition
Types.hpp:36
dunedaq::trigger
Definition
AlgorithmPlugins.hpp:24
dunedaq::daqdataformats::SourceID
SourceID is a generalized representation of the source of a piece of data in the DAQ....
Definition
SourceID.hpp:32
dunedaq::daqdataformats::SourceID::s_invalid_id
static constexpr ID_t s_invalid_id
A value for the id meant to convey that it doesn't identify a data source and shouldn't be worked wit...
Definition
SourceID.hpp:60
dunedaq::daqdataformats::SourceID::Subsystem::kTrigger
@ kTrigger
Types.hpp
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0