14#ifndef ALICEO2_ITSMFT_RUDECODEDATA_H_
15#define ALICEO2_ITSMFT_RUDECODEDATA_H_
37 std::array<PayLoadCont, MaxCablesPerRU>
cableData{};
42 std::array<int, MaxLinksPerRU>
links{};
56 std::unordered_map<uint32_t, std::pair<uint32_t, uint32_t>>
chipErrorsTF{};
71 template <
class Mapping>
81template <
class Mapping>
89 std::array<bool, Mapping::getNChips()> doneChips{};
100 auto chIdGetter = [
this, &mp, cabHW](
int cid) {
102 auto chip = mp.getGlobalChipID(cid, cabHW, *this->
ruInfo);
105 auto localChipIdGetter = [
this, &mp, cabHW](
int gid) {
106 auto localID = mp.getLocalChipID(gid, cabHW, *this->
ruInfo);
113 std::vector<uint16_t>* seenChipIDsPtr = &
seenChipIDs;
122 auto ID = chipData->getChipID();
130 auto nhits = chipData->getData().size();
131 if (nhits && doneChips[chipData->getChipID()]) {
133 LOGP(
debug,
"re-entry into the data of the chip {} after previously detector error", chipData->getChipID());
135#ifdef ALPIDE_DECODING_STAT
143#ifdef ALPIDE_DECODING_STAT
146 if (nhits && chipData->getChipID() < Mapping::getNChips()) {
147 doneChips[chipData->getChipID()] =
true;
class for the ALPIDE data decoding/encoding
Calibration data from GBT data.
Declaration of class for continuos buffer of ALPIDE data.
Transient data classes for single pixel and set of pixels from current chip.
Checks validity of hardware address (HW) and transform it to digit AbsId index.
static bool verifyDecodedCable(std::map< int, ChipPixelData * > &seenChips, PayLoadCont &buffer, std::vector< uint16_t > &seenChipIDs, LG lidGetter, CG cidGetter)
static int decodeChip(ChipPixelData &chipData, T &buffer, std::vector< uint16_t > &seenChips, CG cidGetter)
decode alpide data for the next non-empty chip from the buffer
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
support for the GBT single link data
std::vector< o2::itsmft::ChipPixelData > chipsData
std::unordered_map< uint64_t, uint32_t > linkHBFToDump
void dumpcabledata(int icab)
std::unordered_map< uint32_t, std::pair< uint32_t, uint32_t > > chipErrorsTF
std::vector< uint16_t > seenChipIDsInCable
void setROFInfo(ChipPixelData *chipData, const GBTLink *lnk)
std::map< int, ChipPixelData * > seenChips
static constexpr int MaxChipsPerRU
std::array< int, MaxLinksPerRU > links
std::array< PayLoadCont, MaxCablesPerRU > cableData
static constexpr int MaxCablesPerRU
static constexpr int MaxLinksPerRU
std::array< uint8_t, MaxCablesPerRU > cableHWID
ClassDefNV(RUDecodeData, 2)
std::array< GBTLink *, MaxCablesPerRU > cableLinkPtr
std::vector< ErrorMessage > errMsgVecTF
bool checkLinkInSync(int icab, const o2::InteractionRecord ir)
int decodeROF(const Mapping &mp, const o2::InteractionRecord ir, bool verifyDecoder)
std::vector< uint16_t > seenChipIDs
std::array< uint8_t, MaxCablesPerRU > cableLinkID
void fillChipStatistics(int icab, const ChipPixelData *chipData)
o2::InteractionRecord ir(0, 0)