DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
DetID.hpp
Go to the documentation of this file.
1
8
9#ifndef DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DETID_HPP_
10#define DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DETID_HPP_
11
12#include <cassert>
13#include <cstddef>
14#include <cstdint>
15#include <iomanip>
16#include <istream>
17#include <limits>
18#include <ostream>
19#include <sstream>
20#include <string>
21#include <tuple>
22
24
29struct DetID
30{
34
35 enum class Subdetector : uint16_t // NOLINT(build/unsigned)
36 {
38 kDAQ = 1,
51 };
52
57
58 DetID() = default;
59
60 DetID(const Subdetector& subdetector_arg) // NOLINT(runtime/explicit) as DetID is just an enhanced enum
61 : subdetector(subdetector_arg)
62 {
63 }
64
65 static std::string subdetector_to_string(const Subdetector& type);
66 static Subdetector string_to_subdetector(const std::string& typestring);
67};
68
69std::ostream&
70operator<<(std::ostream& o, DetID const& det_id);
71std::istream&
72operator>>(std::istream& is, DetID& det_id);
73
74} // namespace dunedaq::detdataformats
75
76#include "detail/DetID.hxx"
77
78#endif // DETDATAFORMATS_INCLUDE_DETDATAFORMATS_DETID_HPP_
std::istream & operator>>(std::istream &is, DetID::Subdetector &t)
Read a DetID::Subdetector from a string stream.
Definition DetID.hxx:35
std::ostream & operator<<(std::ostream &o, DAQEthHeader const &h)
static std::string subdetector_to_string(const Subdetector &type)
Definition DetID.hxx:60
static Subdetector string_to_subdetector(const std::string &typestring)
Definition DetID.hxx:95
Subdetector
The Subdetector enum describes the kind of source we're dealing with.
Definition DetID.hpp:36
Subdetector subdetector
The general subdetector of the source of the data.
Definition DetID.hpp:56
DetID(const Subdetector &subdetector_arg)
Definition DetID.hpp:60