DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
TriggerRecordHeaderData.hpp
Go to the documentation of this file.
1
8
9#ifndef DAQDATAFORMATS_INCLUDE_DAQDATAFORMATS_TRIGGERRECORDHEADERDATA_HPP_
10#define DAQDATAFORMATS_INCLUDE_DAQDATAFORMATS_TRIGGERRECORDHEADERDATA_HPP_
11
15
16#include <cstddef>
17#include <limits>
18#include <ostream>
19#include <string>
20#include <vector>
21
23
28{
30 static constexpr uint32_t s_trigger_record_header_magic = 0x33334444; // NOLINT(build/unsigned)
31
32 static constexpr uint32_t s_trigger_record_header_version = 5; // NOLINT(build/unsigned)
33 static constexpr uint64_t s_invalid_number_components = // NOLINT(build/unsigned)
34 std::numeric_limits<uint64_t>::max(); // NOLINT(build/unsigned)
35
36 static constexpr uint32_t s_default_status_bits = 0; // NOLINT(build/unsigned)
37
38 uint32_t trigger_record_header_marker = s_trigger_record_header_magic; // NOLINT(build/unsigned)
39 uint32_t version = s_trigger_record_header_version; // NOLINT(build/unsigned)
40
42
45
47 uint64_t num_requested_components{ s_invalid_number_components }; // NOLINT(build/unsigned)
48
50
51 uint32_t status_bits{ s_default_status_bits }; // NOLINT(build/unsigned)
52
55
58
61
62 uint32_t unused{ 0xFFFFFFFF }; // NOLINT(build/unsigned) Padding to ensure 64-bit alignment
63
65};
66
105
106std::ostream&
107operator<<(std::ostream& o, TriggerRecordHeaderData const& hdr);
108
109} // namespace dunedaq::daqdataformats
110
112
113#endif // DAQDATAFORMATS_INCLUDE_DAQDATAFORMATS_TRIGGERRECORDHEADERDATA_HPP_
uint64_t trigger_number_t
Definition Types.hpp:18
TriggerRecordStatusBits
This enumeration lists all defined status bits, as well as a short documentation of their meaning whe...
@ kMismatch
We have as many fragments as requested but they do not match the requested components.
uint16_t sequence_number_t
Type used to represent sequence within a trigger record.
Definition Types.hpp:38
uint64_t timestamp_t
Type used to represent DUNE timing system timestamps.
Definition Types.hpp:26
uint64_t trigger_type_t
Type used to represent Trigger Decision trigger types.
Definition Types.hpp:35
std::ostream & operator<<(std::ostream &o, ComponentRequest const &cr)
@ kIncomplete
Only part of the requested data is present in the fragment.
@ kInvalid
Status bit 32 and higher are not valid (status_bits is only 32 bits).
SourceID is a generalized representation of the source of a piece of data in the DAQ....
Definition SourceID.hpp:32
Data fields associated with a TriggerRecordHeader.
sequence_number_t max_sequence_number
Maximum sequence number of TriggerRecords corresponding to this trigger.
sequence_number_t sequence_number
Sequence number of this TriggerRecord within the trigger response.
timestamp_t trigger_timestamp
Timestamp of the TriggerDecision.
uint64_t num_requested_components
Number of ComponentRequest objects stored in the TriggerRecordHeader.
trigger_type_t trigger_type
Type of the TriggerDecision.
static constexpr uint32_t s_trigger_record_header_magic
Magic bytes used to identify a TriggerRecordHeaderData struct in a raw data stream.
static constexpr sequence_number_t s_invalid_sequence_number
Definition Types.hpp:56
static constexpr trigger_type_t s_invalid_trigger_type
Definition Types.hpp:55
static constexpr trigger_number_t s_invalid_trigger_number
Definition Types.hpp:48
static constexpr timestamp_t s_invalid_timestamp
Definition Types.hpp:52
static constexpr run_number_t s_invalid_run_number
Definition Types.hpp:47