#include <SourceIdentifier.h>
Public Member Functions | |
uint32_t | code (void) const |
uint32_t | code (void) const |
std::string | human (void) const |
std::string | human (void) const |
std::string | human_detector (void) const |
std::string | human_detector (void) const |
uint16_t | module_id (void) const |
uint16_t | module_id (void) const |
SourceIdentifier (uint32_t sid) | |
SourceIdentifier (eformat::SubDetector subdet, uint16_t id) | |
SourceIdentifier (uint32_t sid) | |
SourceIdentifier (eformat::SubDetector subdet, uint16_t id) | |
eformat::SubDetector | subdetector_id (void) const |
eformat::SubDetector | subdetector_id (void) const |
Private Attributes | |
uint16_t | m_id |
The module identifier. | |
eformat::SubDetector | m_sd |
The subdetector component. |
|
Constructor. Takes the components to form a source identifier.
|
|
Constructor. Takes the source identifier to understand the components from.
00026 : m_sd(static_cast<eformat::SubDetector>((sid >> 16) & 0xff)), 00027 m_id(static_cast<uint16_t>(0xffff & sid)) 00028 { 00029 }
|
|
Constructor. Takes the components to form a source identifier.
|
|
Constructor. Takes the source identifier to understand the components from.
|
|
Gets the full 32-bit number made by assembling the 3 numbers above. |
|
Gets the full 32-bit number made by assembling the 3 numbers above. 00032 {
00033 uint32_t retval = (0xff) & m_sd;
00034 retval <<= 16;
00035 retval |= m_id;
00036 return retval;
00037 }
|
|
Returns a string that represents the source identifier in a human readable format |
|
Returns a string that represents the source identifier in a human readable format 00040 { 00041 std::ostringstream oss; 00042 oss << human_detector() << ", Identifier = " << (unsigned int)module_id(); 00043 return oss.str(); 00044 }
|
|
Returns a string that represents the subdetector identifier in a human readable format |
|
Returns a string that represents the subdetector identifier in a human readable format 00047 { 00048 using namespace eformat; 00049 std::string s; 00050 switch (subdetector_id()) { 00051 case FULL_SD_EVENT: 00052 s += "FULL_SD_EVENT"; 00053 break; 00054 case PIXEL_BARREL: 00055 s += "PIXEL_BARREL"; 00056 break; 00057 case PIXEL_FORWARD_A_SIDE: 00058 s += "PIXEL_FORWARD_A_SIDE"; 00059 break; 00060 case PIXEL_FORWARD_C_SIDE: 00061 s += "PIXEL_FORWARD_C_SIDE"; 00062 break; 00063 case PIXEL_B_LAYER: 00064 s += "PIXEL_B_LAYER"; 00065 break; 00066 case SCT_BARREL_A_SIDE: 00067 s += "SCT_BARREL_A_SIDE"; 00068 break; 00069 case SCT_BARREL_C_SIDE: 00070 s += "SCT_BARREL_C_SIDE"; 00071 break; 00072 case SCT_ENDCAP_A_SIDE: 00073 s += "SCT_ENDCAP_A_SIDE"; 00074 break; 00075 case SCT_ENDCAP_C_SIDE: 00076 s += "SCT_ENDCAP_C_SIDE"; 00077 break; 00078 case TRT_ANCILLARY_CRATE: 00079 s += "TRT_ANCILLARY_CRATE"; 00080 break; 00081 case TRT_BARREL_A_SIDE: 00082 s += "TRT_BARREL_A_SIDE"; 00083 break; 00084 case TRT_BARREL_C_SIDE: 00085 s += "TRT_BARREL_C_SIDE"; 00086 break; 00087 case TRT_ENDCAP_A_SIDE: 00088 s += "TRT_ENDCAP_A_SIDE"; 00089 break; 00090 case TRT_ENDCAP_C_SIDE: 00091 s += "TRT_ENDCAP_C_SIDE"; 00092 break; 00093 case LAR_EM_BARREL_A_SIDE: 00094 s += "LAR_EM_BARREL_A_SIDE"; 00095 break; 00096 case LAR_EM_BARREL_C_SIDE: 00097 s += "LAR_EM_BARREL_C_SIDE"; 00098 break; 00099 case LAR_EM_ENDCAP_A_SIDE: 00100 s += "LAR_EM_ENDCAP_A_SIDE"; 00101 break; 00102 case LAR_EM_ENDCAP_C_SIDE: 00103 s += "LAR_EM_ENDCAP_C_SIDE"; 00104 break; 00105 case LAR_HAD_ENDCAP_A_SIDE: 00106 s += "LAR_HAD_ENDCAP_A_SIDE"; 00107 break; 00108 case LAR_HAD_ENDCAP_C_SIDE: 00109 s += "LAR_HAD_ENDCAP_C_SIDE"; 00110 break; 00111 case LAR_FCAL_A_SIDE: 00112 s += "LAR_FCAL_A_SIDE"; 00113 break; 00114 case LAR_FCAL_C_SIDE: 00115 s += "LAR_FCAL_C_SIDE"; 00116 break; 00117 case TILECAL_LASER_CRATE: 00118 s += "TILECAL_LASER_CRATE"; 00119 break; 00120 case TILECAL_BARREL_A_SIDE: 00121 s += "TILECAL_BARREL_A_SIDE"; 00122 break; 00123 case TILECAL_BARREL_C_SIDE: 00124 s += "TILECAL_BARREL_C_SIDE"; 00125 break; 00126 case TILECAL_EXT_A_SIDE: 00127 s += "TILECAL_EXT_A_SIDE"; 00128 break; 00129 case TILECAL_EXT_C_SIDE: 00130 s += "TILECAL_EXT_C_SIDE"; 00131 break; 00132 case MUON_ANCILLARY_CRATE: 00133 s += "MUON_ANCILLARY_CRATE"; 00134 break; 00135 case MUON_MDT_BARREL_A_SIDE: 00136 s += "MUON_MDT_BARREL_A_SIDE"; 00137 break; 00138 case MUON_MDT_BARREL_C_SIDE: 00139 s += "MUON_MDT_BARREL_C_SIDE"; 00140 break; 00141 case MUON_MDT_ENDCAP_A_SIDE: 00142 s += "MUON_MDT_ENDCAP_A_SIDE"; 00143 break; 00144 case MUON_MDT_ENDCAP_C_SIDE: 00145 s += "MUON_MDT_ENDCAP_C_SIDE"; 00146 break; 00147 case MUON_RPC_BARREL_A_SIDE: 00148 s += "MUON_RPC_BARREL_A_SIDE"; 00149 break; 00150 case MUON_RPC_BARREL_C_SIDE: 00151 s += "MUON_RPC_BARREL_C_SIDE"; 00152 break; 00153 case MUON_TGC_ENDCAP_A_SIDE: 00154 s += "MUON_TGC_ENDCAP_A_SIDE"; 00155 break; 00156 case MUON_TGC_ENDCAP_C_SIDE: 00157 s += "MUON_TGC_ENDCAP_C_SIDE"; 00158 break; 00159 case MUON_CSC_ENDCAP_A_SIDE: 00160 s += "MUON_CSC_ENDCAP_A_SIDE"; 00161 break; 00162 case MUON_CSC_ENDCAP_C_SIDE: 00163 s += "MUON_CSC_ENDCAP_C_SIDE"; 00164 break; 00165 case TDAQ_BEAM_CRATE: 00166 s += "TDAQ_BEAM_CRATE"; 00167 break; 00168 case TDAQ_CALO_PREPROC: 00169 s += "TDAQ_CALO_PREPROC"; 00170 break; 00171 case TDAQ_CALO_CLUSTER_PROC_DAQ: 00172 s += "TDAQ_CALO_CLUSTER_PROC_DAQ"; 00173 break; 00174 case TDAQ_CALO_CLUSTER_PROC_ROI: 00175 s += "TDAQ_CALO_CLUSTER_PROC_ROI"; 00176 break; 00177 case TDAQ_CALO_JET_PROC_DAQ: 00178 s += "TDAQ_CALO_JET_PROC_DAQ"; 00179 break; 00180 case TDAQ_CALO_JET_PROC_ROI: 00181 s += "TDAQ_CALO_JET_PROC_ROI"; 00182 break; 00183 case TDAQ_MUON_CTP_INTERFACE: 00184 s += "TDAQ_MUON_CTP_INTERFACE"; 00185 break; 00186 case TDAQ_CTP: 00187 s += "TDAQ_CTP"; 00188 break; 00189 case TDAQ_L2SV: 00190 s += "TDAQ_L2SV"; 00191 break; 00192 case TDAQ_SFI: 00193 s += "TDAQ_SFI"; 00194 break; 00195 case TDAQ_SFO: 00196 s += "TDAQ_SFO"; 00197 break; 00198 case TDAQ_LVL2: 00199 s += "TDAQ_LVL2"; 00200 break; 00201 case TDAQ_EVENT_FILTER: 00202 s += "TDAQ_EVENT_FILTER"; 00203 break; 00204 case OTHER: 00205 s += "OTHER"; 00206 break; 00207 } 00208 return s; 00209 }
|
|
Extracts the Module identifier from the source identifier. 00123 { return m_id; }
|
|
Extracts the Module identifier from the source identifier. 00123 { return m_id; }
|
|
Extracts the SubDetector component of the identifier. 00118 { return m_sd; }
|
|
Extracts the SubDetector component of the identifier. 00118 { return m_sd; }
|
|
The module identifier.
|
|
The subdetector component.
|