12#ifndef ALICEO2_TRD_DIGIT_H_
13#define ALICEO2_TRD_DIGIT_H_
18#include <unordered_map>
32using ArrayADC = std::array<ADC_t, constants::TIMEBINS>;
74 void setDetector(
int det) { mDetector = ((mDetector & 0xf000) | (det & 0xfff)); }
76 void setADC(
const gsl::span<ADC_t>&
adc) { std::copy(
adc.begin(),
adc.end(), mADC.begin()); }
80 int getHCId()
const {
return (mDetector & 0xfff) * 2 + (mROB % 2); }
99 return mDetector ==
o.mDetector && mROB ==
o.mROB && mMCM ==
o.mMCM && mChannel ==
o.mChannel && mADC ==
o.mADC;
109 std::uint16_t mDetector{0};
110 std::uint8_t mROB{0};
111 std::uint8_t mMCM{0};
112 std::uint8_t mChannel{0};
114 ClassDefNV(
Digit, 4);
int getPreTrigPhase() const
ADC_t getADCval(int tb) const
ADC_t getADCmax(int &idx) const
void setADC(const gsl::span< ADC_t > &adc)
Digit & operator=(const Digit &)=default
bool isNeighbour(const Digit &other) const
bool isSharedDigit() const
void setROB(int row, int col)
void setADC(ArrayADC const &adc)
void setPreTrigPhase(int phase)
void setMCM(int row, int col)
Digit(const Digit &)=default
ArrayADC const & getADC() const
void setDetector(int det)
bool operator==(const Digit &o) const
void setChannel(int channel)
constexpr int NMCMROBINCOL
the number of MCMs per ROB in column direction
std::array< ADC_t, constants::TIMEBINS > ArrayADC
std::ostream & operator<<(std::ostream &stream, const Digit &d)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
static int getROBfromPad(int irow, int icol)
static int getPadRowFromMCM(int irob, int imcm)
static int getPadColFromADC(int irob, int imcm, int iadc)
static int getMCMfromPad(int irow, int icol)
VectorOfTObjectPtrs other