CbmRoot
CbmTofDetectorId.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmTofDetectorId header file -----
3 // ----- Created 29/05/09 by F. Uhlig -----
4 // -------------------------------------------------------------------------
5 
6 
13 #ifndef CBMTOFDETECTORID_H
14 #define CBMTOFDETECTORID_H 1
15 
16 #include <RtypesCore.h> // for Int_t
17 
18 #include "CbmDefs.h"
19 
21 
22 public:
24  : fDetectorSystem(0)
25  , fSMtype(0)
26  , fSModule(0)
27  , fCounter(0)
28  , fGap(0)
29  , fCell(0) {};
30 
31  CbmTofDetectorInfo(Int_t detsystem,
32  Int_t smtype,
33  Int_t smodule,
34  Int_t counter,
35  Int_t gap,
36  Int_t cell)
37  : fDetectorSystem(detsystem)
38  , fSMtype(smtype)
39  , fSModule(smodule)
40  , fCounter(counter)
41  , fGap(gap)
42  , fCell(cell) {};
43 
45  Int_t smtype,
46  Int_t smodule,
47  Int_t counter,
48  Int_t gap,
49  Int_t cell)
50  : fDetectorSystem(ToIntegralType(detsystem))
51  , fSMtype(smtype)
52  , fSModule(smodule)
53  , fCounter(counter)
54  , fGap(gap)
55  , fCell(cell) {};
56 
58  Int_t fSMtype;
59  Int_t fSModule;
60  Int_t fCounter;
61  Int_t fGap;
62  Int_t fCell;
63 };
64 
65 
67 
68 public:
71 
72 
74  virtual ~CbmTofDetectorId() { ; }
75 
77  // Int_t GetSystemId(const Int_t detectorId);
78 
83  virtual CbmTofDetectorInfo GetDetectorInfo(const Int_t detectorId) = 0;
84 
86  virtual Int_t GetSystemId(Int_t detectorId) = 0;
87 
89  virtual Int_t GetSMType(const Int_t detectorId) = 0;
90 
92  virtual Int_t GetSModule(const Int_t detectorId) = 0;
93 
95  virtual Int_t GetCounter(const Int_t detectorId) = 0;
96 
98  virtual Int_t GetGap(const Int_t detectorId) = 0;
99 
101  virtual Int_t GetCell(const Int_t detectorId) = 0;
102 
104  virtual Int_t GetRegion(const Int_t detectorId) = 0;
105 
107  virtual Int_t GetCellId(const Int_t detectorId) = 0;
108 
113  virtual Int_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo) = 0;
114 
115  // char* itoa(int value, char* result, int base);
116 
117 private:
118 };
119 
120 #endif
CbmTofDetectorId::GetGap
virtual Int_t GetGap(const Int_t detectorId)=0
CbmTofDetectorInfo::fGap
Int_t fGap
Definition: CbmTofDetectorId.h:61
CbmTofDetectorId::GetSystemId
virtual Int_t GetSystemId(Int_t detectorId)=0
CbmTofDetectorInfo::fCell
Int_t fCell
Definition: CbmTofDetectorId.h:62
CbmTofDetectorId::GetSMType
virtual Int_t GetSMType(const Int_t detectorId)=0
CbmTofDetectorId::GetCounter
virtual Int_t GetCounter(const Int_t detectorId)=0
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmTofDetectorInfo::fDetectorSystem
Int_t fDetectorSystem
Definition: CbmTofDetectorId.h:55
CbmTofDetectorId::GetRegion
virtual Int_t GetRegion(const Int_t detectorId)=0
CbmTofDetectorId::GetDetectorInfo
virtual CbmTofDetectorInfo GetDetectorInfo(const Int_t detectorId)=0
CbmTofDetectorId::GetCellId
virtual Int_t GetCellId(const Int_t detectorId)=0
CbmTofDetectorId::CbmTofDetectorId
CbmTofDetectorId()
Definition: CbmTofDetectorId.h:70
CbmTofDetectorInfo::CbmTofDetectorInfo
CbmTofDetectorInfo(Int_t detsystem, Int_t smtype, Int_t smodule, Int_t counter, Int_t gap, Int_t cell)
Definition: CbmTofDetectorId.h:31
CbmTofDetectorId::SetDetectorInfo
virtual Int_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo)=0
CbmTofDetectorId::~CbmTofDetectorId
virtual ~CbmTofDetectorId()
Definition: CbmTofDetectorId.h:74
CbmTofDetectorInfo
Definition: CbmTofDetectorId.h:20
CbmTofDetectorId::GetCell
virtual Int_t GetCell(const Int_t detectorId)=0
CbmTofDetectorInfo::fSModule
Int_t fSModule
Definition: CbmTofDetectorId.h:59
counter
int counter
Definition: CbmMvdSensorDigiToHitTask.cxx:72
CbmTofDetectorId::GetSModule
virtual Int_t GetSModule(const Int_t detectorId)=0
ToIntegralType
constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Definition: CbmDefs.h:24
CbmTofDetectorInfo::fCounter
Int_t fCounter
Definition: CbmTofDetectorId.h:60
CbmTofDetectorId
Definition: CbmTofDetectorId.h:66
CbmTofDetectorInfo::CbmTofDetectorInfo
CbmTofDetectorInfo(ECbmModuleId detsystem, Int_t smtype, Int_t smodule, Int_t counter, Int_t gap, Int_t cell)
Definition: CbmTofDetectorId.h:44
CbmTofDetectorInfo::fSMtype
Int_t fSMtype
Definition: CbmTofDetectorId.h:58
CbmTofDetectorInfo::CbmTofDetectorInfo
CbmTofDetectorInfo()
Definition: CbmTofDetectorId.h:23
CbmDefs.h