DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DAQHeader.hpp
Go to the documentation of this file.
1
9
10#ifndef DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQHEADER_HPP_
11#define DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQHEADER_HPP_
12
13#include <cstdint>
14#include <limits>
15#include <ostream>
16
18
23{
24 using word_t = uint32_t; // NOLINT(build/unsigned)
25
26 word_t version : 6, det_id : 6, crate_id : 10, slot_id : 4, link_id : 6;
27 word_t timestamp_1{ std::numeric_limits<word_t>::max() };
28 word_t timestamp_2{ std::numeric_limits<word_t>::max() };
29
30 uint64_t get_timestamp() const // NOLINT(build/unsigned)
31 {
32 return static_cast<uint64_t>(timestamp_1) | (static_cast<uint64_t>(timestamp_2) << 32); // NOLINT(build/unsigned)
33 }
34};
35
36std::ostream&
37operator<<(std::ostream& o, DAQHeader const& h);
38
39} // namespace dunedaq::detdataformats
40
41#include "detail/DAQHeader.hxx"
42
43#endif // DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DAQHEADER_HPP_
std::ostream & operator<<(std::ostream &o, DAQEthHeader const &h)
DAQHeader is a versioned and unified structure for every FE electronics.
Definition DAQHeader.hpp:23