DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
detdataformats
include
detdataformats
detail
DAQEthHeader.hxx
Go to the documentation of this file.
1
2
namespace
dunedaq::detdataformats
{
3
4
static_assert
(std::endian::native == std::endian::little,
5
"The DAQEthHeader bitfield layout assumes little-endian architecture"
);
6
7
static_assert
(std::is_trivially_copyable_v<DAQEthHeader>,
8
"DAQEthHeader isn't trivially copyable and can't be safely std::memcpy'd"
);
9
static_assert
(std::is_standard_layout_v<DAQEthHeader>,
10
"DAQEthHeader isn't standard layout; reinterpret_cast and offsetof can't safely be used with it"
);
11
12
static_assert
(
sizeof
(
DAQEthHeader
) == 16,
"DAQEthHeader not the expected size"
);
13
static_assert
(offsetof(
DAQEthHeader
, timestamp) == 8,
"timestamp field not at expected offset"
);
14
15
inline
std::ostream&
16
operator<<
(std::ostream& o,
DAQEthHeader
const
& h)
17
{
18
return
o <<
"Version:"
<<
static_cast<
unsigned
>
(h.
version
) <<
" DetID:"
<<
static_cast<
unsigned
>
(h.
det_id
)
19
<<
" CrateID:"
<<
static_cast<
unsigned
>
(h.
crate_id
) <<
" SlotID:"
<<
static_cast<
unsigned
>
(h.
slot_id
)
20
<<
" StreamID:"
<<
static_cast<
unsigned
>
(h.
stream_id
) <<
" SequenceID: "
<<
static_cast<
unsigned
>
(h.
seq_id
)
21
<<
" Block length: "
<<
static_cast<
unsigned
>
(h.
block_length
) <<
" Timestamp: "
<< h.
get_timestamp
() <<
'\n'
;
22
}
23
24
}
// namespace dunedaq::detdataformats
dunedaq::detdataformats
Definition
DAQEthHeader.hpp:17
dunedaq::detdataformats::operator<<
std::ostream & operator<<(std::ostream &o, DAQEthHeader const &h)
Definition
DAQEthHeader.hxx:16
dunedaq::detdataformats::DAQEthHeader
DAQEthHeader is a versioned and unified structure for every FE electronics.
Definition
DAQEthHeader.hpp:23
dunedaq::detdataformats::DAQEthHeader::get_timestamp
uint64_t get_timestamp() const
Definition
DAQEthHeader.hpp:30
dunedaq::detdataformats::DAQEthHeader::det_id
word_t det_id
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::seq_id
word_t seq_id
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::version
word_t version
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::slot_id
word_t slot_id
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::stream_id
word_t stream_id
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::crate_id
word_t crate_id
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::block_length
word_t block_length
Definition
DAQEthHeader.hpp:27
Generated on
for DUNE-DAQ by
1.17.0