38 (1 << fgkBits[3]) - 1, (1 << fgkBits[4]) - 1, (1 << fgkBits[5]) - 1,
39 (1 << fgkBits[6]) - 1};
50 LOG(error) <<
"Station Id " << station <<
" exceeds maximum (" << (1 <<
fgkBits[
kMuchStation]) - 1 <<
")";
54 LOG(error) <<
"Layer Id " << layer <<
" exceeds maximum (" << (1 <<
fgkBits[
kMuchLayer]) - 1 <<
")";
58 LOG(error) <<
"LayerSide Id " << layerside <<
" exceeds maximum (" << (1 <<
fgkBits[
kMuchLayerSide]) - 1 <<
")";
62 LOG(error) <<
"Module Id " <<
module << " exceeds maximum (" << (1 << fgkBits[kMuchModule]) - 1 << ")";
66 LOG(error) <<
"Sector Id " << sector <<
" exceeds maximum (" << (1 <<
fgkBits[
kMuchSector]) - 1 <<
")";
70 LOG(error) <<
"Channel Id " << channel <<
" exceeds maximum (" << (1 <<
fgkBits[
kMuchChannel]) - 1 <<
")";
76 | sector << fgkShift[kMuchSector] | channel << fgkShift[kMuchChannel];
87 if (elementId[level] >= (1 <<
fgkBits[level])) {
88 LOG(error) <<
"Id " << elementId[level] <<
" for MUCH level " << level <<
" exceeds maximum ("
89 << (1 <<
fgkBits[level]) - 1 <<
")";
92 address = address | (elementId[level] <<
fgkShift[level]);
105 LOG(info) <<
"Level " << std::setw(2) << std::right << level <<
": bits " << std::setw(2) <<
fgkBits[level]
106 <<
", max. range " << std::setw(6) <<
fgkMask[level];
115 if (newId >= (1 <<
fgkBits[level])) {
116 LOG(error) <<
"Id " << newId <<
" for MUCH level " << level <<
" exceeds maximum (" << (1 <<
fgkBits[level]) - 1
ClassImp(CbmConverterManager)
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
@ kMuch
Muon detection system.
@ kMuchNofLevels
Number of MUCH levels.
@ kMuchLayerSide
LayerSide.
@ kMuchSystem
System = MUCH.
Interface class to unique address for the MUCH.
static const int32_t fgkBits[kMuchNofLevels]
static uint32_t SetElementId(uint32_t address, int32_t level, int32_t newId)
static const int32_t fgkMask[kMuchNofLevels]
static const int32_t fgkShift[kMuchNofLevels]
static uint32_t GetAddress(int32_t station=0, int32_t layer=0, int32_t side=0, int32_t module=0, int32_t sector=0, int32_t channel=0)