7#define CBMSTSADDRESS_H 1
11#include "FairLogger.h"
12#include "CbmAddress.h"
94 return fgkBits[level];
105 return ( address & ( fgkMask[level] << fgkShift[level] ) )
123 if ( newId >= ( 1 << fgkBits[level]) ) {
124 LOG(error) <<
"Id " << newId <<
" for STS level " << level
125 <<
" exceeds maximum (" << (1 << fgkBits[level]) - 1
129 return ( address & (~ (fgkMask[level] << fgkShift[level]) ) )
130 | ( newId << fgkShift[level]);
@ kStsSystem
System = STS.
@ kStsNofLevels
Number of STS levels.
@ kStsHalfLadder
Halfladder.
Interface class to unique address for the STS.
static UInt_t GetAddress(Int_t station=0, Int_t ladder=0, Int_t halfladder=0, Int_t module=0, Int_t sensor=0, Int_t side=0, Int_t channel=0)
static Int_t GetElementId(UInt_t address, Int_t level)
static Int_t GetNofBits(Int_t level)
static UInt_t SetElementId(UInt_t address, Int_t level, Int_t newId)
static Int_t GetNofLevels()