209 const uint8_t* arr =
reinterpret_cast<const uint8_t*
>(&data);
210 snprintf(buf,
sizeof(buf),
211 "BE= %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X LE= "
212 "%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X ",
213 arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[7], arr[6], arr[5], arr[4], arr[3],
214 arr[2], arr[1], arr[0]);
220 snprintf(buf,
sizeof(buf),
" ");
224 double timeInSec = getMsgFullTimeD(epoch) / 1.e9;
227 switch (getMessageType()) {
229 snprintf(buf,
sizeof(buf),
"Msg:%u ", getMessageType());
235 snprintf(buf,
sizeof(buf),
236 "EPOCH @%17.11f Get4:%2d Epoche2:%10u 0x%08x Sync:%x "
237 "Dataloss:%x Epochloss:%x Epochmissmatch:%x",
238 timeInSec, getGdpbGenChipId(), getGdpbEpEpochNb(), getGdpbEpEpochNb(), getGdpbEpSync(),
239 getGdpbEpDataLoss(), getGdpbEpEpochLoss(), getGdpbEpMissmatch());
243 os << buf << std::endl;
246 snprintf(buf,
sizeof(buf),
"Msg:%u ", getMessageType());
252 if (getGdpbHitIs24b()) {
253 snprintf(buf,
sizeof(buf),
"Get4 24b @%17.11f Get4:%2d Chn:%3d Edge:%1d Ts:%7d", timeInSec,
254 getGdpbGenChipId(), getGdpbHitChanId(), getGdpbHit24Edge(), getGdpbHitFullTs());
257 snprintf(buf,
sizeof(buf),
"Get4 24b @%17.11f Get4:%2d Chn:%3d Dll:%1d Ts:%7d", timeInSec, getGdpbGenChipId(),
258 getGdpbHitChanId(), getGdpbHit32DllLck(), getGdpbHitFullTs());
263 os << buf << std::endl;
266 kind = kind & ~msg_print_Human;
275 snprintf(buf,
sizeof(buf),
"Msg:%2u ", getMessageType());
284 switch (getMessageType()) {
286 if (getGdpbHitIs24b()) {
287 snprintf(buf,
sizeof(buf),
"Get4 24 bits, Get4:0x%04x Chn:%1x Edge:%1x Ts:0x%03x", getGdpbGenChipId(),
288 getGdpbHitChanId(), getGdpbHit24Edge(), getGdpbHitFullTs());
291 snprintf(buf,
sizeof(buf),
292 "Get4 32 bits, Get4:0x%04x Channel %1d Ts:0x%03x Ft:0x%02x "
293 "Tot:0x%02x Dll %1d",
294 getGdpbGenChipId(), getGdpbHitChanId(), getGdpbHitCoarse(), getGdpbHitFineTs(), getGdpbHit32Tot(),
295 getGdpbHit32DllLck());
300 snprintf(buf,
sizeof(buf),
301 "Get4:0x%04x Link: %1u Epoch:0x%08x Sync:%x Dataloss:%x "
302 "Epochloss:%x Epochmissmatch:%x",
303 getGdpbGenChipId(), getGdpbEpLinkId(), getGdpbEpEpochNb(), getGdpbEpSync(), getGdpbEpDataLoss(),
304 getGdpbEpEpochLoss(), getGdpbEpMissmatch());
309 snprintf(buf,
sizeof(buf),
310 "Get4 Slow control, Get4:0x%04x => Chan:%01d Edge:%01d "
311 "Type:%01x Data:0x%06x",
312 getGdpbGenChipId(), 0x0, 0x0, 0x0, getGdpbSlcData());
319 switch (getGdpbSysSubType()) {
321 snprintf(sysbuf,
sizeof(sysbuf),
322 "Get4:0x%04x Ch:0x%01x Edge:%01x Unused:%06x "
323 "ErrCode:0x%02x - GET4 V1 Error Event",
324 getGdpbGenChipId(), getGdpbSysErrChanId(), getGdpbSysErrEdge(), getGdpbSysErrUnused(),
325 getGdpbSysErrData());
329 snprintf(sysbuf,
sizeof(sysbuf),
"Unknown GET4 message, data: 0x%08x", getGdpbSysUnkwData());
332 if (getGdpbSysFwErrResync())
333 snprintf(sysbuf,
sizeof(sysbuf),
"GET4 Resynchronization: Get4:0x%04x", getGdpbGenChipId());
335 snprintf(sysbuf,
sizeof(sysbuf),
"GET4 SYNC synchronization error");
338 snprintf(sysbuf,
sizeof(sysbuf),
"Pattern message => Type %d, Index %2d, Pattern 0x%08X",
339 getGdpbSysPattType(), getGdpbSysPattIndex(), getGdpbSysPattPattern());
341 default: snprintf(sysbuf,
sizeof(sysbuf),
"unknown system message type %u", getGdpbSysSubType());
343 snprintf(buf,
sizeof(buf),
"%s", sysbuf);
352 switch (getStarTrigMsgIndex()) {
354 snprintf(buf,
sizeof(buf),
357 "STAR token A, gDPB TS MSB bits: 0x%s000000",
366 "STAR token B, gDPB TS LSB bits: 0x0000000000%s, STAR TS MSB "
367 "bits: 0x%s000000000000",
377 "STAR token C, , STAR TS Mid "
386 "STAR token D, , STAR TS LSB "
387 "bits: 0x00000000000000%s"
388 ", Token: %03x, DAQ: %1x; TRG:%1x",
390 FormatHexPrintout(getStarTsLsbStarD(), 2,
'0').c_str(), getStarTokenStarD(), getStarDaqCmdStarD(),
391 getStarTrigCmdStarD());
399 snprintf(buf,
sizeof(buf),
"Error - unexpected MessageType: %1x, full data %08X::%08X", getMessageType(),
400 getField(32, 32), getField(0, 32));
406 os << buf << std::endl;