DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
fmt::formatter< dunedaq::daqdataformats::SourceID > Struct Reference

Public Member Functions

constexpr auto parse (format_parse_context &ctx) -> format_parse_context::iterator
 
auto format (const dunedaq::daqdataformats::SourceID &sid, format_context &ctx) const -> format_context::iterator
 

Detailed Description

Definition at line 45 of file tapipe.cxx.

Member Function Documentation

◆ format()

auto fmt::formatter< dunedaq::daqdataformats::SourceID >::format ( const dunedaq::daqdataformats::SourceID & sid,
format_context & ctx ) const -> format_context::iterator
inline

Definition at line 95 of file tapipe.cxx.

95 {
96 return fmt::format_to(ctx.out(), "({}, {})", dunedaq::daqdataformats::SourceID::subsystem_to_string(sid.subsystem), sid.id);
97 }
Subsystem subsystem
The general subsystem of the source of the data.
Definition SourceID.hpp:69
static std::string subsystem_to_string(const Subsystem &type)
Definition SourceID.hxx:88
ID_t id
Unique identifier of the source of the data.
Definition SourceID.hpp:74

◆ parse()

auto fmt::formatter< dunedaq::daqdataformats::SourceID >::parse ( format_parse_context & ctx) -> format_parse_context::iterator
inlineconstexpr

Definition at line 78 of file tapipe.cxx.

78 {
79
80 // Parse the presentation format and store it in the formatter:
81 // auto it = ctx.begin(), end = ctx.end();
82 // if (it != end && (*it == 'f' || *it == 'e')) presentation = *it++;
83
84 // Check if reached the end of the range:
85 // if (it != end && *it != '}')
86 // fmt::detail::throw_format_error("invalid format");
87
88 // return it;
89 return ctx.begin();
90 }

The documentation for this struct was generated from the following file: