DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq::detdataformats Namespace Reference

Namespaces

namespace  python

Classes

struct  DAQEthHeader
 DAQEthHeader is a versioned and unified structure for every FE electronics. More...
struct  DAQHeader
 DAQHeader is a versioned and unified structure for every FE electronics. More...
struct  DetID
 DetID is a structure containing the 6 bits field of the unique identifier for a subdetector in the raw data. For convenience this field is expanded to 16 bits. More...
class  HSIFrame

Functions

std::ostream & operator<< (std::ostream &o, DAQEthHeader const &h)
std::ostream & operator<< (std::ostream &o, DAQHeader const &h)
std::ostream & operator<< (std::ostream &o, DetID::Subdetector const &type)
 Stream a Subdetector instance in a human-readable form.
std::ostream & operator<< (std::ostream &o, DetID const &det_id)
 Stream a DetID instance in a human-readable form.
std::istream & operator>> (std::istream &is, DetID::Subdetector &t)
 Read a DetID::Subdetector from a string stream.
std::istream & operator>> (std::istream &is, DetID &det_id)
 Read a DetID from a string stream.

Function Documentation

◆ operator<<() [1/4]

std::ostream & dunedaq::detdataformats::operator<< ( std::ostream & o,
DAQEthHeader const & h )
inline

Definition at line 15 of file DAQEthHeader.hxx.

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}

◆ operator<<() [2/4]

std::ostream & dunedaq::detdataformats::operator<< ( std::ostream & o,
DAQHeader const & h )
inline

Definition at line 19 of file DAQHeader.hxx.

21{
22 return o << "Version:" << static_cast<unsigned>(h.version) << " DetID:" << static_cast<unsigned>(h.det_id)
23 << " CrateID:" << static_cast<unsigned>(h.crate_id) << " SlotID:" << static_cast<unsigned>(h.slot_id)
24 << " LinkID:" << static_cast<unsigned>(h.link_id) << " Timestamp: " << h.get_timestamp() << '\n';
25}

◆ operator<<() [3/4]

std::ostream & dunedaq::detdataformats::operator<< ( std::ostream & o,
DetID const & det_id )
inline

Stream a DetID instance in a human-readable form.

Parameters
oStream to output to
idDetID to stream
Returns
Stream instance for further streaming

Definition at line 22 of file DetID.hxx.

24{
25 return o << "subdetector: " << det_id.subdetector;
26}

◆ operator<<() [4/4]

std::ostream & dunedaq::detdataformats::operator<< ( std::ostream & o,
DetID::Subdetector const & type )
inline

Stream a Subdetector instance in a human-readable form.

Parameters
oStream to output to
idSubdetector to stream
Returns
Stream instance for further streaming

Definition at line 10 of file DetID.hxx.

12{
14}
static std::string subdetector_to_string(const Subdetector &type)
Definition DetID.hxx:60

◆ operator>>() [1/2]

std::istream & dunedaq::detdataformats::operator>> ( std::istream & is,
DetID & det_id )
inline

Read a DetID from a string stream.

Parameters
isStream to read from
idDetID to fill
Returns
Stream instance for further streaming

Definition at line 51 of file DetID.hxx.

52{
53 std::string tmp;
54 is >> tmp >> det_id.subdetector;
55
56 return is;
57}

◆ operator>>() [2/2]

std::istream & dunedaq::detdataformats::operator>> ( std::istream & is,
DetID::Subdetector & t )
inline

Read a DetID::Subdetector from a string stream.

Parameters
isStream to read from
idSubdetector to fill
Returns
Stream instance for further streaming

Definition at line 35 of file DetID.hxx.

36{
37 std::string tmp;
38 is >> tmp;
39
41
42 return is;
43}
static Subdetector string_to_subdetector(const std::string &typestring)
Definition DetID.hxx:95