33 const uint64_t tTimeslice)
const
50 const uint32_t nwords = msDescr.size / 4;
53 const uint32_t* wd =
reinterpret_cast<const uint32_t*
>(msContent);
55 unsigned char lFaspOld(0xff);
56 std::vector<FaspMessage> vMess;
57 for (uint64_t j = 0; j < nwords; j++, wd++) {
59 uint8_t ch_id = w & 0xf;
60 uint8_t isaux = (w >> 4) & 0x1;
61 uint8_t slice = (w >> 5) & 0x7f;
62 uint16_t data = (w >> 12) & 0x3fff;
63 uint8_t fasp_id = ((w >> 26) & 0x3f);
78 if (lFaspOld != fasp_id) {
93 vMess.emplace_back(ch_id,
kData, slice, data >> 1, crob_id, lFaspOld);
106 const uint64_t tdaqOffset = asicPar.
fChanParams[messes[0].ch].fDaqOffset;
108 for (
auto imess : messes) {
109 const int32_t pad = std::abs(asicPar.
fChanParams[imess.ch].fPadAddress);
110 const bool hasPairingR = bool(asicPar.
fChanParams[imess.ch].fPadAddress > 0);
111 const uint64_t lTime = time + tdaqOffset + imess.tlab;
112 const uint16_t lchR = hasPairingR ? imess.data : 0;
113 const uint16_t lchT = hasPairingR ? 0 : imess.data;
114 std::vector<CbmTrdDigi>& digiBuffer = ctx.
fDigiBuffer[pad];
116 if (digiBuffer.size() == 0) {
117 digiBuffer.emplace_back(pad, lchT, lchR, lTime);
118 digiBuffer.back().SetAddressModule(mod_id);
123 auto id = digiBuffer.rbegin();
127 const int32_t dtime = (*id).GetTimeDAQ() - lTime;
130 if (abs(dtime) < 5) {
131 r = (*id).GetCharge(t, dt);
132 if (lchR && r < 0.1) {
133 (*id).SetCharge(t, lchR, -dtime);
136 else if (lchT && t < 0.1) {
137 (*id).SetCharge(lchT, r, +dtime);
138 (*id).SetTimeDAQ(uint64_t((*id).GetTimeDAQ() - dtime));
145 digiBuffer.emplace_back(pad, lchT, lchR, lTime);
146 digiBuffer.back().SetAddressModule(mod_id);
147 id = digiBuffer.rbegin();
151 for (++
id;
id != digiBuffer.rend(); ++id) {
152 r = (*id).GetCharge(t, dt);
153 if (lchR &&
int(r)) {
154 (*id).SetCharge(t, lchR, dt);
158 else if (lchT &&
int(t)) {
159 (*id).SetCharge(lchT, r, dt);
UnpackMonitorData fMonitor
Container for monitoring data.
std::array< std::vector< CbmTrdDigi >, NFASPMOD *NFASPCH > fDigiBuffer