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

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...

#include <DetID.hpp>

Public Types

enum class  Subdetector : uint16_t {
  kUnknown = 0 , kDAQ = 1 , kHD_PDS = 2 , kHD_TPC = 3 ,
  kHD_CRT = 4 , kVD_CathodePDS = 8 , kVD_MembranePDS = 9 , kVD_BottomTPC = 10 ,
  kVD_TopTPC = 11 , kVD_BernCRT = 12 , kVD_GrenobleCRT = 13 , kNDLAr_TPC = 32 ,
  kNDLAr_PDS = 33 , kND_GAr = 34
}
 The Subdetector enum describes the kind of source we're dealing with. More...

Public Member Functions

 DetID ()=default
 DetID (const Subdetector &subdetector_arg)

Static Public Member Functions

static std::string subdetector_to_string (const Subdetector &type)
static Subdetector string_to_subdetector (const std::string &typestring)

Public Attributes

Subdetector subdetector { Subdetector::kUnknown }
 The general subdetector of the source of the data.

Detailed Description

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.

Definition at line 29 of file DetID.hpp.

Member Enumeration Documentation

◆ Subdetector

enum class dunedaq::detdataformats::DetID::Subdetector : uint16_t
strong

The Subdetector enum describes the kind of source we're dealing with.

Enumerator
kUnknown 
kDAQ 
kHD_PDS 
kHD_TPC 
kHD_CRT 
kVD_CathodePDS 
kVD_MembranePDS 
kVD_BottomTPC 
kVD_TopTPC 
kVD_BernCRT 
kVD_GrenobleCRT 
kNDLAr_TPC 
kNDLAr_PDS 
kND_GAr 

Definition at line 35 of file DetID.hpp.

36 {
37 kUnknown = 0,
38 kDAQ = 1,
39 kHD_PDS = 2,
40 kHD_TPC = 3,
41 kHD_CRT = 4,
42 kVD_CathodePDS = 8,
43 kVD_MembranePDS = 9,
44 kVD_BottomTPC = 10,
45 kVD_TopTPC = 11,
46 kVD_BernCRT = 12,
47 kVD_GrenobleCRT = 13,
48 kNDLAr_TPC = 32,
49 kNDLAr_PDS = 33,
50 kND_GAr = 34
51 };

Constructor & Destructor Documentation

◆ DetID() [1/2]

dunedaq::detdataformats::DetID::DetID ( )
default

◆ DetID() [2/2]

dunedaq::detdataformats::DetID::DetID ( const Subdetector & subdetector_arg)
inline

Definition at line 60 of file DetID.hpp.

61 : subdetector(subdetector_arg)
62 {
63 }
Subdetector subdetector
The general subdetector of the source of the data.
Definition DetID.hpp:56

Member Function Documentation

◆ string_to_subdetector()

DetID::Subdetector dunedaq::detdataformats::DetID::string_to_subdetector ( const std::string & typestring)
inlinestatic

Definition at line 95 of file DetID.hxx.

96{
97 if (typestring == "DAQ")
98 return Subdetector::kDAQ;
99 if (typestring == "HD_PDS")
101 if (typestring == "HD_TPC")
103 if (typestring == "HD_CRT")
105 if (typestring == "VD_CathodePDS")
107 if (typestring == "VD_MembranePDS")
109 if (typestring == "VD_BottomTPC")
111 if (typestring == "VD_TopTPC")
113 if (typestring == "VD_BernCRT")
115 if (typestring == "VD_GrenobleCRT")
117 if (typestring == "NDLAr_TPC")
119 if (typestring == "NDLAr_PDS")
121 if (typestring == "ND_GAr")
123
125}

◆ subdetector_to_string()

std::string dunedaq::detdataformats::DetID::subdetector_to_string ( const Subdetector & type)
inlinestatic

Definition at line 60 of file DetID.hxx.

61{
62 switch (type) {
64 return "DAQ";
66 return "HD_PDS";
68 return "HD_TPC";
70 return "HD_CRT";
72 return "VD_CathodePDS";
74 return "VD_MembranePDS";
76 return "VD_BottomTPC";
78 return "VD_TopTPC";
80 return "VD_BernCRT";
82 return "VD_GrenobleCRT";
84 return "NDLAr_TPC";
86 return "NDLAr_PDS";
88 return "ND_GAr";
89 default:
90 return "Unknown";
91 }
92}

Member Data Documentation

◆ subdetector

Subdetector dunedaq::detdataformats::DetID::subdetector { Subdetector::kUnknown }

The general subdetector of the source of the data.

Definition at line 56 of file DetID.hpp.


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