81 (1 <<
kBits[0][4]) - 1, (1 <<
kBits[0][5]) - 1}};
96 int32_t
GetAddress(uint32_t camera = 0, uint32_t strip = 0, uint32_t backplane = 0, uint32_t pmt = 0,
138 int32_t
SetElementId(int32_t address, int32_t level, uint32_t newId);
144 std::string
ToString(int32_t address);
constexpr int32_t kMask[kCurrentVersion+1][static_cast< uint32_t >(RichElementLevel::kNumLevels)]
constexpr int32_t kShift[kCurrentVersion+1][static_cast< uint32_t >(RichElementLevel::kNumLevels)]
constexpr uint16_t kBits[kCurrentVersion+1][static_cast< uint32_t >(RichElementLevel::kNumLevels)]
Functions to encode or decode the address field of RICH data.
int32_t GetMotherAddress(int32_t address, int32_t level)
Construct the address of an element from the address of a descendant element.
int32_t SetElementId(int32_t address, int32_t level, uint32_t newId)
Set the index of an element, leaving the other element levels untouched.
uint32_t GetVersion(int32_t address)
Extract version number.
constexpr int32_t kVersionMask
constexpr uint32_t kCurrentVersion
uint32_t GetSystemId(int32_t address)
Get system Id (should be integer value of ECbmModuleId::kRich)
constexpr int32_t kVersionSize
uint32_t GetElementId(int32_t address, int32_t level)
Get the index of an element.
constexpr int32_t kVersionShift
std::string ToString(int32_t address)
String output.
int32_t GetAddress(uint32_t camera=0, uint32_t strip=0, uint32_t backplane=0, uint32_t pmt=0, uint32_t pixel=0, uint32_t version=kCurrentVersion)
Construct address.