DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
detdataformats
include
detdataformats
detail
DetID.hxx
Go to the documentation of this file.
1
2
namespace
dunedaq::detdataformats
{
3
10
inline
std::ostream&
11
operator<<
(std::ostream& o,
DetID::Subdetector
const
&
type
)
12
{
13
return
o <<
DetID::subdetector_to_string
(
type
);
14
}
15
22
inline
std::ostream&
23
operator<<
(std::ostream& o,
DetID
const
& det_id)
24
{
25
return
o <<
"subdetector: "
<< det_id.subdetector;
26
}
27
34
inline
std::istream&
35
operator>>
(std::istream& is,
DetID::Subdetector
& t)
36
{
37
std::string tmp;
38
is >> tmp;
39
40
t =
DetID::string_to_subdetector
(tmp);
41
42
return
is;
43
}
44
50
inline
std::istream&
51
operator>>
(std::istream& is,
DetID
& det_id)
52
{
53
std::string tmp;
54
is >> tmp >> det_id.subdetector;
55
56
return
is;
57
}
58
59
inline
std::string
60
DetID::subdetector_to_string
(
const
Subdetector
&
type
)
61
{
62
switch
(
type
) {
63
case
Subdetector::kDAQ
:
64
return
"DAQ"
;
65
case
Subdetector::kHD_PDS
:
66
return
"HD_PDS"
;
67
case
Subdetector::kHD_TPC
:
68
return
"HD_TPC"
;
69
case
Subdetector::kHD_CRT
:
70
return
"HD_CRT"
;
71
case
Subdetector::kVD_CathodePDS
:
72
return
"VD_CathodePDS"
;
73
case
Subdetector::kVD_MembranePDS
:
74
return
"VD_MembranePDS"
;
75
case
Subdetector::kVD_BottomTPC
:
76
return
"VD_BottomTPC"
;
77
case
Subdetector::kVD_TopTPC
:
78
return
"VD_TopTPC"
;
79
case
Subdetector::kVD_BernCRT
:
80
return
"VD_BernCRT"
;
81
case
Subdetector::kVD_GrenobleCRT
:
82
return
"VD_GrenobleCRT"
;
83
case
Subdetector::kNDLAr_TPC
:
84
return
"NDLAr_TPC"
;
85
case
Subdetector::kNDLAr_PDS
:
86
return
"NDLAr_PDS"
;
87
case
Subdetector::kND_GAr
:
88
return
"ND_GAr"
;
89
default
:
90
return
"Unknown"
;
91
}
92
}
93
94
inline
DetID::Subdetector
95
DetID::string_to_subdetector
(
const
std::string& typestring)
96
{
97
if
(typestring ==
"DAQ"
)
98
return
Subdetector::kDAQ
;
99
if
(typestring ==
"HD_PDS"
)
100
return
Subdetector::kHD_PDS
;
101
if
(typestring ==
"HD_TPC"
)
102
return
Subdetector::kHD_TPC
;
103
if
(typestring ==
"HD_CRT"
)
104
return
Subdetector::kHD_CRT
;
105
if
(typestring ==
"VD_CathodePDS"
)
106
return
Subdetector::kVD_CathodePDS
;
107
if
(typestring ==
"VD_MembranePDS"
)
108
return
Subdetector::kVD_MembranePDS
;
109
if
(typestring ==
"VD_BottomTPC"
)
110
return
Subdetector::kVD_BottomTPC
;
111
if
(typestring ==
"VD_TopTPC"
)
112
return
Subdetector::kVD_TopTPC
;
113
if
(typestring ==
"VD_BernCRT"
)
114
return
Subdetector::kVD_BernCRT
;
115
if
(typestring ==
"VD_GrenobleCRT"
)
116
return
Subdetector::kVD_GrenobleCRT
;
117
if
(typestring ==
"NDLAr_TPC"
)
118
return
Subdetector::kNDLAr_TPC
;
119
if
(typestring ==
"NDLAr_PDS"
)
120
return
Subdetector::kNDLAr_PDS
;
121
if
(typestring ==
"ND_GAr"
)
122
return
Subdetector::kND_GAr
;
123
124
return
Subdetector::kUnknown
;
125
}
126
127
}
// namespace dunedaq::detdataformats
type
type
Definition
TriggerActivity_serialization.hpp:48
dunedaq::detdataformats
Definition
DAQEthHeader.hpp:17
dunedaq::detdataformats::operator>>
std::istream & operator>>(std::istream &is, DetID::Subdetector &t)
Read a DetID::Subdetector from a string stream.
Definition
DetID.hxx:35
dunedaq::detdataformats::operator<<
std::ostream & operator<<(std::ostream &o, DAQEthHeader const &h)
Definition
DAQEthHeader.hxx:16
dunedaq::detdataformats::DetID
DetID is a structure containing the 6 bits field of the unique identifier for a subdetector in the ra...
Definition
DetID.hpp:30
dunedaq::detdataformats::DetID::subdetector_to_string
static std::string subdetector_to_string(const Subdetector &type)
Definition
DetID.hxx:60
dunedaq::detdataformats::DetID::string_to_subdetector
static Subdetector string_to_subdetector(const std::string &typestring)
Definition
DetID.hxx:95
dunedaq::detdataformats::DetID::Subdetector
Subdetector
The Subdetector enum describes the kind of source we're dealing with.
Definition
DetID.hpp:36
dunedaq::detdataformats::DetID::Subdetector::kVD_GrenobleCRT
@ kVD_GrenobleCRT
Definition
DetID.hpp:47
dunedaq::detdataformats::DetID::Subdetector::kVD_MembranePDS
@ kVD_MembranePDS
Definition
DetID.hpp:43
dunedaq::detdataformats::DetID::Subdetector::kVD_TopTPC
@ kVD_TopTPC
Definition
DetID.hpp:45
dunedaq::detdataformats::DetID::Subdetector::kUnknown
@ kUnknown
Definition
DetID.hpp:37
dunedaq::detdataformats::DetID::Subdetector::kHD_TPC
@ kHD_TPC
Definition
DetID.hpp:40
dunedaq::detdataformats::DetID::Subdetector::kND_GAr
@ kND_GAr
Definition
DetID.hpp:50
dunedaq::detdataformats::DetID::Subdetector::kVD_BottomTPC
@ kVD_BottomTPC
Definition
DetID.hpp:44
dunedaq::detdataformats::DetID::Subdetector::kNDLAr_TPC
@ kNDLAr_TPC
Definition
DetID.hpp:48
dunedaq::detdataformats::DetID::Subdetector::kNDLAr_PDS
@ kNDLAr_PDS
Definition
DetID.hpp:49
dunedaq::detdataformats::DetID::Subdetector::kVD_CathodePDS
@ kVD_CathodePDS
Definition
DetID.hpp:42
dunedaq::detdataformats::DetID::Subdetector::kHD_CRT
@ kHD_CRT
Definition
DetID.hpp:41
dunedaq::detdataformats::DetID::Subdetector::kHD_PDS
@ kHD_PDS
Definition
DetID.hpp:39
dunedaq::detdataformats::DetID::Subdetector::kVD_BernCRT
@ kVD_BernCRT
Definition
DetID.hpp:46
dunedaq::detdataformats::DetID::Subdetector::kDAQ
@ kDAQ
Definition
DetID.hpp:38
Generated on
for DUNE-DAQ by
1.17.0