36 std::string
FormatHexPrintout(uint64_t ulVal,
char cFill = 0, uint uWidth = 0,
bool bUppercase =
false)
44 if (0 != cFill) ss << std::setfill(cFill);
45 if (0 < uWidth) ss << std::setw(uWidth);
46 if (bUppercase) ss << std::uppercase;
49 ss << ulVal << std::dec;
52 if (0 != cFill) ss << std::setfill(
' ');
63 uint64_t uOtherTs = 0;
72 return uThisTs < uOtherTs;
85 return uThisTs < uOtherTs;
123 stop += 0x3FFFFFFFFFFFLLU;
125 printf(
"Epochs overflow error in CalcDistance\n");
140 stop += 0x3FFFFFFFFFFFLLU;
142 printf(
"Epochs overflow error in CalcDistanceD\n");
205 const uint8_t* arr =
reinterpret_cast<const uint8_t*
>(&
data);
213 snprintf(buf,
sizeof(buf),
"LE= %02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X ", arr[7], arr[6], arr[5], arr[4], arr[3],
214 arr[2], arr[1], arr[0]);
221 snprintf(buf,
sizeof(buf),
" ");
236 snprintf(buf,
sizeof(buf),
237 "EPOCH @%17.11f Get4:%2d Epoche2:%10u 0x%08x Sync:%x "
238 "Dataloss:%x Epochloss:%x Epochmissmatch:%x",
244 os << buf << std::endl;
253 snprintf(buf,
sizeof(buf),
"Get4 24b @%17.11f Get4:%2d Chn:%3d Dll:%1d Ts:%7d", timeInSec,
getGet4Idx(),
258 os << buf << std::endl;
310 snprintf(buf,
sizeof(buf),
"Error - unexpected MessageType: %1x, full data %08X::%08X",
getMessageType(),
317 os << buf << std::endl;
void PrintMessage(unsigned outType=msg_print_Cout, unsigned kind=msg_print_Human) const
bool operator<(const FullMessage &other) const
strict weak ordering operator, including epoch for both messages
uint64_t fulExtendedEpoch
uint32_t getGdpbHitFullTs() const
bool getGdpbHit32DllLck() const
bool operator==(const critof001::Message &other) const
equality operator, assumes same epoch for both messages
bool operator!=(const critof001::Message &other) const
inequality operator, assumes same epoch for both messages
void printDataLog(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to the Fairroot logger.
uint16_t getGet4Idx() const
bool getGdpbEpEpochLoss() const
uint8_t getMessageType() const
Returns the message type. Valid for all message types. 2 bit.
static uint64_t CalcDistance(uint64_t start, uint64_t stop)
Returns the time difference between two expanded time stamps.
void printData(unsigned outType=msg_print_Cout, unsigned kind=msg_print_Human, uint32_t epoch=0, std::ostream &os=std::cout) const
Print message in binary or human readable format to a stream.
uint32_t getField(uint32_t shift, uint32_t len) const
uint16_t getGdpbHitChanId() const
bool operator<(const critof001::Message &other) const
strict weak ordering operator, assumes same epoch for both messages
bool getGdpbEpSync() const
bool getGdpbEpDataLoss() const
void printDataCout(unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
Print message in human readable format to cout.
uint32_t getGdpbEpEpochNb() const
uint64_t getMsgFullTime(uint64_t epoch) const
Returns expanded and adjusted time of message (in ns)
static double CalcDistanceD(double start, double stop)
Returns the time difference between two expanded time stamps.
double getMsgFullTimeD(uint64_t epoch) const
Returns expanded and adjusted time of message in double (in ns)
bool getGdpbEpMissmatch() const
std::string FormatHexPrintout(uint64_t ulVal, char cFill=0, uint uWidth=0, bool bUppercase=false)
const double kdClockCycleSizeNs