DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
detdataformats
include
detdataformats
DAQEthHeader.hpp
Go to the documentation of this file.
1
10
#ifndef DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQETHHEADER_HPP_
11
#define DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQETHHEADER_HPP_
12
13
#include <cstdint>
14
#include <ostream>
15
16
namespace
dunedaq::detdataformats
{
17
21
struct
DAQEthHeader
22
{
23
using
word_t
= uint64_t;
// NOLINT(build/unsigned)
24
25
word_t
version
: 6,
det_id
: 6,
crate_id
: 10,
slot_id
: 4,
stream_id
: 8,
reserved
: 6,
seq_id
: 12,
block_length
: 12;
26
word_t
timestamp
: 64;
27
28
uint64_t
get_timestamp
() const
// NOLINT(build/unsigned)
29
{
30
return
uint64_t(
timestamp
);
// NOLINT(build/unsigned)
31
}
32
};
33
34
inline
std::ostream&
35
operator<<
(std::ostream& o,
DAQEthHeader
const
& h)
36
{
37
return
o <<
"Version:"
<< unsigned(h.
version
) <<
" DetID:"
<< unsigned(h.
det_id
) <<
" CrateID:"
<< unsigned(h.
crate_id
)
38
<<
" SlotID:"
<< unsigned(h.
slot_id
) <<
" StreamID:"
<< unsigned(h.
stream_id
)
39
<<
" SequenceID: "
<< unsigned(h.
seq_id
) <<
" Block length: "
<< unsigned(h.
block_length
)
40
<<
" Timestamp: "
<< h.
get_timestamp
() <<
'\n'
;
41
}
42
43
}
// namespace dunedaq::detdataformats
44
45
#endif
// DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQETHHEADER_HPP_
dunedaq::detdataformats
Definition
DAQEthHeader.hpp:16
dunedaq::detdataformats::operator<<
std::ostream & operator<<(std::ostream &o, DAQEthHeader const &h)
Definition
DAQEthHeader.hpp:35
dunedaq::detdataformats::DAQEthHeader
DAQEthHeader is a versioned and unified structure for every FE electronics.
Definition
DAQEthHeader.hpp:22
dunedaq::detdataformats::DAQEthHeader::get_timestamp
uint64_t get_timestamp() const
Definition
DAQEthHeader.hpp:28
dunedaq::detdataformats::DAQEthHeader::det_id
word_t det_id
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::word_t
uint64_t word_t
Definition
DAQEthHeader.hpp:23
dunedaq::detdataformats::DAQEthHeader::timestamp
word_t timestamp
Definition
DAQEthHeader.hpp:26
dunedaq::detdataformats::DAQEthHeader::seq_id
word_t seq_id
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::version
word_t version
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::slot_id
word_t slot_id
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::reserved
word_t reserved
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::stream_id
word_t stream_id
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::crate_id
word_t crate_id
Definition
DAQEthHeader.hpp:25
dunedaq::detdataformats::DAQEthHeader::block_length
word_t block_length
Definition
DAQEthHeader.hpp:25
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0