11#ifndef CBMMVDADDRESS_H
12#define CBMMVDADDRESS_H 1
72 static uint32_t
GetAddress(int32_t station = 0, int32_t sideUD = 0, int32_t sideLR = 0, int32_t sideTB = 0,
73 int32_t ladder = 0, int32_t sensor = 0, int32_t sensorY = 0, int32_t sensorX = 0);
75 static uint32_t
GetAddress(int32_t* elementIds);
124 return address & mask;
129 static uint32_t
SetElementId(uint32_t address, int32_t level, int32_t newId);
@ kMvdSensorX
Sensor X (row)
@ kMvdSideUD
Upstream/Downstream.
@ kMvdSensorY
Sensor Y (column)
@ kMvdSystem
System = MVD.
@ kMvdNofLevels
Number of MVD levels.
Functions to encode or decode the address field of MVD data.
static int32_t GetSideUDIndex(uint32_t address)
static uint32_t GetDetectorId(uint32_t address)
Provides a unit sensor address, masking information on the pixels (bits 13-31)
static uint32_t GetAddressFromSensorNrAndPixelXY(int32_t sensorNr, int32_t sensorY, int32_t sensorX)
static int32_t GetElementId(uint32_t address, int32_t level)
static const int32_t fgkMask[kMvdNofLevels]
static int32_t GetNofBits(int32_t level)
static constexpr int32_t fgkBits[kMvdNofLevels]
static int32_t GetStationIndex(uint32_t address)
static uint32_t SetElementId(uint32_t address, int32_t level, int32_t newId)
static const int32_t fgkShiftSensorNr
static const int32_t fgkShift[kMvdNofLevels]
static int32_t GetSideLRIndex(uint32_t address)
ClassDef(CbmMvdAddress, 1)
static int32_t GetNofLevels()
static int32_t GetSystemIndex(uint32_t address)
static int32_t GetSensorXIndex(uint32_t address)
static int32_t GetLadderIndex(uint32_t address)
static int32_t GetElementAddress(int32_t address, int32_t level)
static int32_t GetSensorNrFromAddress(uint32_t address)
static const int32_t fgkMaskSensorNr
static int32_t GetSideTBIndex(uint32_t address)
static constexpr int32_t fgkBitsSensorNr
static uint32_t GetAddress(int32_t station=0, int32_t sideUD=0, int32_t sideLR=0, int32_t sideTB=0, int32_t ladder=0, int32_t sensor=0, int32_t sensorY=0, int32_t sensorX=0)
static int32_t GetSensorYIndex(uint32_t address)
static int32_t GetSensorIndex(uint32_t address)