51 , fvMsComponentsList()
54 , fbIgnoreOverlapMs(kFALSE)
55 , fsHistoFileFullname(
"data/TofPulserHistos.root")
56 , fuMsAcceptsPercent(100)
61 , fdTsCoreSizeInNs(0.0)
68 , fuNrOfChannelsPerGet4(0)
69 , fuNrOfChannelsPerFee(0)
71 , fuNrOfGet4PerGdpb(0)
72 , fuNrOfChannelsPerGdpb(0)
73 , fulCurrentTsIndex(0)
82 , fviMsgCounter(11, 0)
84 fhGdpbAsicSpiCounts(nullptr)
122 LOG(info) <<
"ReInit parameter containers for " << GetName();
152 LOG(info) <<
"GDPB Id of TOF " << i <<
" : " << std::hex <<
fUnpackPar->
GetGdpbId(i) << std::dec;
179 UInt_t uGet4topadi[32] = {4, 3, 2, 1,
180 8, 7, 6, 5, 12, 11, 10, 9, 16, 15, 14, 13, 20, 19,
181 18, 17, 24, 23, 22, 21, 28, 27, 26, 25, 32, 31, 30, 29};
183 UInt_t uPaditoget4[32] = {4, 3, 2, 1,
184 12, 11, 10, 9, 20, 19, 18, 17, 28, 27, 26, 25, 32, 31,
185 30, 29, 8, 7, 6, 5, 16, 15, 14, 13, 24, 23, 22, 21};
196 UInt_t kuElinkToGet4[
kuNbGet4PerGbtx] = {27, 2, 7, 3, 31, 26, 30, 1, 33, 37, 32, 13, 9, 14,
197 10, 15, 17, 21, 16, 35, 34, 38, 25, 24, 0, 6, 20, 23,
198 18, 22, 28, 4, 29, 5, 19, 36, 39, 8, 12, 11};
199 UInt_t kuGet4ToElink[
kuNbGet4PerGbtx] = {24, 7, 1, 3, 31, 33, 25, 2, 37, 12, 14, 39, 38, 11,
200 13, 15, 18, 16, 28, 34, 26, 17, 29, 27, 23, 22, 5, 0,
201 30, 32, 6, 4, 10, 8, 20, 19, 35, 9, 21, 36};
254 LOG(info) <<
"Reset eTOF STAR histos ";
259 LOG(info) <<
"Start saving eTOF STAR histos ";
265 LOG(debug1) <<
"Timeslice contains " << ts.num_microslices(component) <<
"microslices.";
271 Int_t messageType = -111;
275 for (UInt_t uMsIdx = 0; uMsIdx < uNbMsLoop; uMsIdx++) {
283 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
284 LOG(info) <<
"hi hv eqid flag si sv idx/start crc size offset";
286 "%02x %02x %04x %04x %02x %02x %016lx %08x %08x %016lx",
static_cast<unsigned int>(msDescriptor.hdr_id),
287 static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
288 static_cast<unsigned int>(msDescriptor.sys_id),
static_cast<unsigned int>(msDescriptor.sys_ver),
289 msDescriptor.idx, msDescriptor.crc, msDescriptor.size, msDescriptor.offset);
295 constexpr uint32_t kuBytesPerMessage = 8;
298 auto msDescriptor = ts.descriptor(uMsComp, uMsIdx);
300 fdMsIndex =
static_cast<double>(msDescriptor.idx);
302 const uint8_t* msContent =
reinterpret_cast<const uint8_t*
>(ts.content(uMsComp, uMsIdx));
304 uint32_t
size = msDescriptor.size;
306 if (
size > 0) LOG(debug) <<
"Microslice: " << msDescriptor.idx <<
" has size: " <<
size;
309 if (0 != (
size % kuBytesPerMessage))
310 LOG(error) <<
"The input microslice buffer does NOT "
311 <<
"contain only complete nDPB messages!";
314 uint32_t uNbMessages = (
size - (
size % kuBytesPerMessage)) / kuBytesPerMessage;
322 LOG(info) <<
"---------------------------------------------------------------";
323 LOG(info) <<
"hi hv eqid flag si sv idx/start crc size offset";
325 "%02x %02x %04x %04x %02x %02x %016lx %08x %08x %016lx",
static_cast<unsigned int>(msDescriptor.hdr_id),
326 static_cast<unsigned int>(msDescriptor.hdr_ver), msDescriptor.eq_id, msDescriptor.flags,
327 static_cast<unsigned int>(msDescriptor.sys_id),
static_cast<unsigned int>(msDescriptor.sys_ver),
328 msDescriptor.idx, msDescriptor.crc, msDescriptor.size, msDescriptor.offset);
329 LOG(warning) <<
"Could not find the gDPB index for AFCK id 0x" << std::hex <<
fuGdpbId << std::dec
331 << uMsCompIdx <<
"\n"
332 <<
"If valid this index has to be added in the TOF "
333 "parameter file in the RocIdArray field";
340 const uint64_t* pInBuff =
reinterpret_cast<const uint64_t*
>(msContent);
341 for (uint32_t uIdx = 0; uIdx < uNbMessages; uIdx++) {
343 uint64_t ulData =
static_cast<uint64_t
>(pInBuff[uIdx]);
346 if (0 == uIdx) {
continue; }
363 <<
" set in parameters.";
365 switch (messageType) {
378 LOG(error) <<
"Message type " << std::hex << std::setw(2) << static_cast<uint16_t>(messageType)
379 <<
" not included in Get4 unpacker.";