19const NoiseMap* AlpideCoder::mNoisyPixels =
nullptr;
24 for (
auto id : mFirstInRow) {
25 auto link = mPix2Encode[
id];
26 printf(
"r%3d | c%4d", link.row, link.col);
27 while (link.nextInRow != -1) {
28 link = mPix2Encode[link.nextInRow];
29 printf(
" %3d", link.col);
45 uint16_t chipInModule, uint16_t
bc, uint16_t roflags)
51 for (
const auto& pix :
pixels) {
52 addPixel(pix.getRow(), pix.getCol());
54 buffer.addFast(makeChipHeader(chipInModule,
bc));
59 int nfoundInRegion = procRegion(
buffer,
ir);
60 nfound += nfoundInRegion;
62 if (!nfoundInRegion) {
66 buffer.addFast(makeChipTrailer(roflags));
69 buffer.addFast(makeChipEmpty(chipInModule,
bc));
79 std::array<short, 2 * NRows> hits;
80 int nHits = 0, nData = 0;
82 int nr = mFirstInRow.size();
83 short col0 = ((reg *
NDColInReg + dcol) << 1), col1 = col0 + 1;
85 for (
int ir = 0;
ir < nr;
ir++) {
86 int linkID = mFirstInRow[
ir];
90 if (mPix2Encode[linkID].
col > col1) {
93 short rowID = mPix2Encode[linkID].row;
96 if (mPix2Encode[linkID].
col == col0) {
98 linkID = mPix2Encode[linkID].nextInRow;
100 if (linkID != -1 && mPix2Encode[linkID].
col == col1) {
102 linkID = mPix2Encode[linkID].nextInRow;
104 short addr0 = rowID << 1;
107 hits[nHits++] = addr0;
110 hits[nHits++] = addr0 + 1;
114 hits[nHits++] = addr0;
117 hits[nHits++] = addr0 + 1;
121 mFirstInRow[
ir] = -1;
124 mFirstInRow[
ir] = linkID;
129 std::sort(hits.begin(), hits.begin() + nHits);
131 while ((ih < nHits)) {
132 short addrE, addrW = hits[ih++];
135 while ((ih < nHits && (addrE = hits[ih]) < addrLim)) {
136 mask |= 0x1 << (addrE - addrW - 1);
140 buffer.addFast(makeDataLong(dcol, addrW));
143 buffer.addFast(makeDataShort(dcol, addrW));
152void AlpideCoder::resetMap()
class for the ALPIDE data decoding/encoding
static constexpr int NDColInReg
int encodeChip(PayLoadCont &buffer, const o2::itsmft::ChipPixelData &chipData, uint16_t chipInModule, uint16_t bc, uint16_t roflags=0)
static constexpr int HitMapSize
static constexpr int NRegions
const std::vector< PixelData > & getData() const
NoiseMap class for the ITS and MFT.
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
uint8_t itsSharedClusterMap uint8_t
o2::InteractionRecord ir(0, 0)