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

Namespaces

namespace  fwtp
 
namespace  python
 
namespace  wib
 

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 versioned 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 34 of file DAQEthHeader.hpp.

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}

◆ operator<<() [2/4]

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

Definition at line 35 of file DAQHeader.hpp.

37{
38 return o << "Version:" << unsigned(h.version) << " DetID:" << unsigned(h.det_id) << " CrateID:" << unsigned(h.crate_id)
39 << " SlotID:" << unsigned(h.slot_id) << " LinkID:" << unsigned(h.link_id)
40 << " Timestamp: " << h.get_timestamp() << '\n';
41}

◆ 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 29 of file DetID.hxx.

31{
32 return o << "subdetector: " << det_id.subdetector ;
33}

◆ 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 17 of file DetID.hxx.

19{
20 return o << DetID::subdetector_to_string(type);
21}

◆ 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 58 of file DetID.hxx.

59{
60 std::string tmp;
61 is >> tmp >> det_id.subdetector;
62
63 return is;
64}

◆ 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 42 of file DetID.hxx.

43{
44 std::string tmp;
45 is >> tmp;
46
47 t = DetID::string_to_subdetector(tmp);
48
49 return is;
50}