/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/eformat/eformat-00-00-04/eformat/SourceIdentifier.h

Go to the documentation of this file.
00001 //Dear emacs, this is -*- c++ -*-
00002 
00014 #ifndef EFORMAT_HELPER_SOURCEIDENTIFIER_H
00015 #define EFORMAT_HELPER_SOURCEIDENTIFIER_H
00016 
00017 #include <stdint.h>
00018 #include <string>
00019 
00020 namespace eformat {
00021 
00025   enum SubDetector { FULL_SD_EVENT = 0x00,
00026                      PIXEL_BARREL = 0x11,
00027                      PIXEL_FORWARD_A_SIDE = 0x12,
00028                      PIXEL_FORWARD_C_SIDE = 0x13,
00029                      PIXEL_B_LAYER = 0x14,
00030                      SCT_BARREL_A_SIDE = 0x21,
00031                      SCT_BARREL_C_SIDE = 0x22,
00032                      SCT_ENDCAP_A_SIDE = 0x23,
00033                      SCT_ENDCAP_C_SIDE = 0x24,
00034                      TRT_ANCILLARY_CRATE = 0x30,
00035                      TRT_BARREL_A_SIDE = 0x31,
00036                      TRT_BARREL_C_SIDE = 0x32,
00037                      TRT_ENDCAP_A_SIDE = 0x33,
00038                      TRT_ENDCAP_C_SIDE = 0x34,
00039                      LAR_EM_BARREL_A_SIDE = 0x41,
00040                      LAR_EM_BARREL_C_SIDE = 0x42,
00041                      LAR_EM_ENDCAP_A_SIDE = 0x43,
00042                      LAR_EM_ENDCAP_C_SIDE = 0x44,
00043                      LAR_HAD_ENDCAP_A_SIDE = 0x45,
00044                      LAR_HAD_ENDCAP_C_SIDE = 0x46,
00045                      LAR_FCAL_A_SIDE = 0x47,
00046                      LAR_FCAL_C_SIDE = 0x48,
00047                      TILECAL_LASER_CRATE = 0x50,
00048                      TILECAL_BARREL_A_SIDE = 0x51,
00049                      TILECAL_BARREL_C_SIDE = 0x52,
00050                      TILECAL_EXT_A_SIDE = 0x53,
00051                      TILECAL_EXT_C_SIDE = 0x54,
00052                      MUON_ANCILLARY_CRATE = 0x60,
00053                      MUON_MDT_BARREL_A_SIDE = 0x61,
00054                      MUON_MDT_BARREL_C_SIDE = 0x62,
00055                      MUON_MDT_ENDCAP_A_SIDE = 0x63,
00056                      MUON_MDT_ENDCAP_C_SIDE = 0x64,
00057                      MUON_RPC_BARREL_A_SIDE = 0x65,
00058                      MUON_RPC_BARREL_C_SIDE = 0x66,
00059                      MUON_TGC_ENDCAP_A_SIDE = 0x67,
00060                      MUON_TGC_ENDCAP_C_SIDE = 0x68,
00061                      MUON_CSC_ENDCAP_A_SIDE = 0x69,
00062                      MUON_CSC_ENDCAP_C_SIDE = 0x6A,
00063                      TDAQ_BEAM_CRATE = 0x70,
00064                      TDAQ_CALO_PREPROC = 0x71,
00065                      TDAQ_CALO_CLUSTER_PROC_DAQ = 0x72,
00066                      TDAQ_CALO_CLUSTER_PROC_ROI = 0x73,
00067                      TDAQ_CALO_JET_PROC_DAQ = 0x74,
00068                      TDAQ_CALO_JET_PROC_ROI = 0x75,
00069                      TDAQ_MUON_CTP_INTERFACE = 0x76,
00070                      TDAQ_CTP = 0x77,
00071                      TDAQ_L2SV = 0x78,
00072                      TDAQ_SFI = 0x79,
00073                      TDAQ_SFO = 0x7a,
00074                      TDAQ_LVL2 = 0x7b,
00075                      TDAQ_EVENT_FILTER = 0x7c,
00076                      OTHER = 0x81,
00077                      BESIII_MDC = 0xa1,
00078                      BESIII_TOF = 0xa2,
00079                      BESIII_EMC = 0xa3,
00080                      BESIII_MUC = 0xa4,
00081                      BESIII_TRG = 0xa5
00082                 };
00083 
00087   typedef enum SubDetector SubDetector;
00088 
00089   namespace helper {
00090 
00094     class SourceIdentifier {
00095 
00096     public:
00103       SourceIdentifier (eformat::SubDetector subdet, uint16_t id);
00104 
00113       SourceIdentifier (uint32_t sid);
00114 
00118       inline eformat::SubDetector subdetector_id (void) const { return m_sd; }
00119 
00123       inline uint16_t module_id (void) const { return m_id; }
00124 
00129       uint32_t code (void) const;
00130 
00135       std::string human (void) const;
00136 
00141       std::string human_detector (void) const;
00142 
00143     private: //representation
00144 
00145       eformat::SubDetector m_sd; 
00146       uint16_t m_id; 
00147 
00148     };
00149 
00150   }
00151 
00152 }
00153 
00154 #endif //EVENTFORMAT_HELPER_SOURCEID_H

Generated on Tue Nov 29 22:58:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7