CbmRoot
Loading...
Searching...
No Matches
CbmTofDetectorId.h
Go to the documentation of this file.
1/* Copyright (C) 2013-2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
5// -------------------------------------------------------------------------
6// ----- CbmTofDetectorId header file -----
7// ----- Created 29/05/09 by F. Uhlig -----
8// -------------------------------------------------------------------------
9
10
16
17#ifndef CBMTOFDETECTORID_H
18#define CBMTOFDETECTORID_H 1
19
20#include "CbmDefs.h"
21
22#include <cstdint>
23
25
26 public:
28
29 CbmTofDetectorInfo(int32_t detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap, int32_t cell)
30 : fDetectorSystem(detsystem)
31 , fSMtype(smtype)
32 , fSModule(smodule)
34 , fGap(gap)
35 , fCell(cell)
36 , fCounterType(0){};
37
38 CbmTofDetectorInfo(ECbmModuleId detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap,
39 int32_t cell)
41 , fSMtype(smtype)
42 , fSModule(smodule)
44 , fGap(gap)
45 , fCell(cell)
46 , fCounterType(0){};
47
48 CbmTofDetectorInfo(ECbmModuleId detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap,
49 int32_t cell, int32_t counterType)
51 , fSMtype(smtype)
52 , fSModule(smodule)
54 , fGap(gap)
55 , fCell(cell)
56 , fCounterType(counterType){};
57
59 int32_t fSMtype;
60 int32_t fSModule;
61 int32_t fCounter;
62 int32_t fGap;
63 int32_t fCell;
64 int32_t fCounterType;
65};
66
67
69
70 public:
73
74
76 virtual ~CbmTofDetectorId() { ; }
77
79 // int32_t GetSystemId(const int32_t detectorId);
80
85 virtual CbmTofDetectorInfo GetDetectorInfo(const int32_t detectorId) = 0;
86
88 virtual int32_t GetSystemId(int32_t detectorId) = 0;
89
91 virtual int32_t GetSMType(const int32_t detectorId) = 0;
92
94 virtual int32_t GetSModule(const int32_t detectorId) = 0;
95
97 virtual int32_t GetCounter(const int32_t detectorId) = 0;
98
100 virtual int32_t GetGap(const int32_t detectorId) = 0;
101
103 virtual int32_t GetCell(const int32_t detectorId) = 0;
104
106 virtual int32_t GetRegion(const int32_t detectorId) = 0;
107
109 virtual int32_t GetCellId(const int32_t detectorId) = 0;
110
115 virtual int32_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo) = 0;
116
117 // char* itoa(int value, char* result, int base);
118
119 private:
120};
121
122#endif
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Converts an element of enum class to its underlying integral type.
Definition CbmDefs.h:33
ECbmModuleId
Enumerator for module Identifiers.
Definition CbmDefs.h:45
virtual int32_t GetCellId(const int32_t detectorId)=0
virtual int32_t GetSModule(const int32_t detectorId)=0
virtual int32_t SetDetectorInfo(const CbmTofDetectorInfo detectorInfo)=0
virtual int32_t GetGap(const int32_t detectorId)=0
virtual int32_t GetCounter(const int32_t detectorId)=0
virtual int32_t GetSystemId(int32_t detectorId)=0
virtual int32_t GetCell(const int32_t detectorId)=0
virtual CbmTofDetectorInfo GetDetectorInfo(const int32_t detectorId)=0
virtual int32_t GetRegion(const int32_t detectorId)=0
virtual ~CbmTofDetectorId()
virtual int32_t GetSMType(const int32_t detectorId)=0
CbmTofDetectorInfo(ECbmModuleId detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap, int32_t cell, int32_t counterType)
CbmTofDetectorInfo(ECbmModuleId detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap, int32_t cell)
CbmTofDetectorInfo(int32_t detsystem, int32_t smtype, int32_t smodule, int32_t counter, int32_t gap, int32_t cell)