CbmRoot
Loading...
Searching...
No Matches
critof001 Namespace Reference

Classes

class  FullMessage
 
class  Message
 

Enumerations

enum  MessageTypes { MSG_HIT = 0 , MSG_EPOCH = 1 , MSG_SLOWC = 2 , MSG_SYST = 3 }
 
enum  SysMessageTypes { SYS_GET4_ERROR = 0 , SYS_GDPB_UNKWN = 1 , SYS_GET4_SYNC_MISS = 2 , SYS_PATTERN = 3 }
 
enum  PattMessageTypes { PATT_MISSMATCH = 0 , PATT_ENABLE = 1 , PATT_RESYNC = 2 , PATT_STATUS = 3 }
 
enum  MessagePrintMask { msg_print_Prefix = 1 , msg_print_Data = 2 , msg_print_Hex = 4 , msg_print_Human = 8 }
 
enum  MessagePrintType { msg_print_Cout = 1 , msg_print_FairLog = 2 , msg_print_File = 3 }
 
enum  Get4Message32bSlC { GET4_32B_SLC_SCALER = 0 , GET4_32B_SLC_DEADT = 1 , GET4_32B_SLC_SPIREAD = 2 , GET4_32B_SLC_START_SEU = 3 }
 
enum  Get4Message32bErrors {
  GET4_V2X_ERR_READ_INIT = 0x00 , GET4_V2X_ERR_SYNC = 0x01 , GET4_V2X_ERR_EP_CNT_SYNC = 0x02 , GET4_V2X_ERR_EP = 0x03 ,
  GET4_V2X_ERR_FIFO_WRITE = 0x04 , GET4_V2X_ERR_LOST_EVT = 0x05 , GET4_V2X_ERR_CHAN_STATE = 0x06 , GET4_V2X_ERR_TOK_RING_ST = 0x07 ,
  GET4_V2X_ERR_TOKEN = 0x08 , GET4_V2X_ERR_READOUT_ERR = 0x09 , GET4_V2X_ERR_SPI = 0x0A , GET4_V2X_ERR_DLL_LOCK = 0x0B ,
  GET4_V2X_ERR_DLL_RESET = 0x0C , GET4_V2X_ERR_TOT_OVERWRT = 0x11 , GET4_V2X_ERR_TOT_RANGE = 0x12 , GET4_V2X_ERR_EVT_DISCARD = 0x13 ,
  GET4_V2X_ERR_ADD_RIS_EDG = 0x14 , GET4_V2X_ERR_UNPAIR_FALL = 0x15 , GET4_V2X_ERR_SEQUENCE_ER = 0x16 , GET4_V2X_ERR_EPOCH_OVERF = 0x17 ,
  GET4_V2X_ERR_UNKNOWN = 0x7F
}
 

Functions

std::string FormatHexPrintout (uint64_t ulVal, char cFill=0, uint uWidth=0, bool bUppercase=false)
 

Variables

const double kdClockCycleSize = 6250.0
 
const double kdClockCycleSizeNs = kdClockCycleSize / 1000.0
 
const double kdTotBinSize = 50.0
 
const uint32_t kuFineTime = 0x0000007F
 
const uint32_t kuFtShift = 0
 
const uint32_t kuCoarseTime = 0x0007FF80
 
const uint32_t kuCtShift = 7
 
const uint32_t kuCtSize = 12
 
const uint32_t kuFineCounterSize = ((kuFineTime >> kuFtShift) + 1)
 
const uint32_t kuCoarseCounterSize = ((kuCoarseTime >> kuCtShift) + 1)
 
const uint32_t kuCoarseOverflowTest = kuCoarseCounterSize / 2
 
const uint32_t kuTotCounterSize = 256
 
const double kdFtSize = kuFineCounterSize
 
const double kdFtBinsNb = 112.
 
const double kdBinSize = kdClockCycleSize / kdFtBinsNb
 
const uint32_t kuEpochInBins = kuCoarseCounterSize * kdFtBinsNb
 
const double kdEpochInPs = static_cast<double>(kuCoarseCounterSize) * kdClockCycleSize
 
const double kdEpochInNs = kdEpochInPs / 1000.0
 
const double kuEpochInNs = static_cast<uint64_t>(kdEpochInNs)
 
const uint32_t kuEpochCounterSz = 0xFFFFFF
 Works as epoch integer in ns!
 
const uint64_t kulEpochCycleEp = static_cast<uint64_t>(kuEpochCounterSz + 1)
 
const uint64_t kulEpochCycleBins = kulEpochCycleEp * kuEpochInBins
 
const uint64_t kulEpochCycleInNs = kulEpochCycleBins * kuEpochInNs
 
const double kdEpochCycleInS = static_cast<double>(kuEpochCounterSz + 1) * (kdEpochInNs / 1e9)
 
const uint64_t kulEpochCycleFieldSz = 0x1FFFFF
 
const uint32_t kuChipIdMergedEpoch = 255
 
const uint32_t kuFeePulserChannel = 3
 
const uint32_t kuFeePulserChannelDiam = 0
 
const uint64_t kuEndOfMsMask = 0xFFFFFFFFFFFF
 
const uint64_t kuEndOfMsMarker = 0xdeadbeeeeeef
 

Detailed Description

Clone of the functions in the flestool library to avoid circular dependencies Replaces the following block of code which generate warnings depending on the OS Form( "%llx", static_cast<uint64_t>(val) ); Form( "%lx", static_cast<uint64_t>(val) ); Form( "%0llx", static_cast<uint64_t>(val) ); Form( "%0lx", static_cast<uint64_t>(val) ); Form( "%016llx", static_cast<uint64_t>(val) ); Form( "%016lx", static_cast<uint64_t>(val) );

Enumeration Type Documentation

◆ Get4Message32bErrors

Enumerator
GET4_V2X_ERR_READ_INIT 
GET4_V2X_ERR_SYNC 
GET4_V2X_ERR_EP_CNT_SYNC 
GET4_V2X_ERR_EP 
GET4_V2X_ERR_FIFO_WRITE 
GET4_V2X_ERR_LOST_EVT 
GET4_V2X_ERR_CHAN_STATE 
GET4_V2X_ERR_TOK_RING_ST 
GET4_V2X_ERR_TOKEN 
GET4_V2X_ERR_READOUT_ERR 
GET4_V2X_ERR_SPI 
GET4_V2X_ERR_DLL_LOCK 
GET4_V2X_ERR_DLL_RESET 
GET4_V2X_ERR_TOT_OVERWRT 
GET4_V2X_ERR_TOT_RANGE 
GET4_V2X_ERR_EVT_DISCARD 
GET4_V2X_ERR_ADD_RIS_EDG 
GET4_V2X_ERR_UNPAIR_FALL 
GET4_V2X_ERR_SEQUENCE_ER 
GET4_V2X_ERR_EPOCH_OVERF 
GET4_V2X_ERR_UNKNOWN 

Definition at line 113 of file CriGet4Mess001.h.

◆ Get4Message32bSlC

Enumerator
GET4_32B_SLC_SCALER 
GET4_32B_SLC_DEADT 
GET4_32B_SLC_SPIREAD 
GET4_32B_SLC_START_SEU 

Definition at line 105 of file CriGet4Mess001.h.

◆ MessagePrintMask

Enumerator
msg_print_Prefix 
msg_print_Data 
msg_print_Hex 
msg_print_Human 

Definition at line 90 of file CriGet4Mess001.h.

◆ MessagePrintType

Enumerator
msg_print_Cout 
msg_print_FairLog 
msg_print_File 

Definition at line 98 of file CriGet4Mess001.h.

◆ MessageTypes

Enumerator
MSG_HIT 
MSG_EPOCH 
MSG_SLOWC 
MSG_SYST 

Definition at line 65 of file CriGet4Mess001.h.

◆ PattMessageTypes

Enumerator
PATT_MISSMATCH 
PATT_ENABLE 
PATT_RESYNC 
PATT_STATUS 

Definition at line 82 of file CriGet4Mess001.h.

◆ SysMessageTypes

Enumerator
SYS_GET4_ERROR 
SYS_GDPB_UNKWN 
SYS_GET4_SYNC_MISS 
SYS_PATTERN 

Definition at line 73 of file CriGet4Mess001.h.

Function Documentation

◆ FormatHexPrintout()

std::string critof001::FormatHexPrintout ( uint64_t ulVal,
char cFill = 0,
uint uWidth = 0,
bool bUppercase = false )

Set hex printout mode

Set fill character and/or width if provided by user

push value

Restore fill character if needed

Definition at line 36 of file CriGet4Mess001.cxx.

Variable Documentation

◆ kdBinSize

const double critof001::kdBinSize = kdClockCycleSize / kdFtBinsNb

Definition at line 34 of file CriGet4Mess001.h.

◆ kdClockCycleSize

const double critof001::kdClockCycleSize = 6250.0

Definition at line 14 of file CriGet4Mess001.h.

◆ kdClockCycleSizeNs

const double critof001::kdClockCycleSizeNs = kdClockCycleSize / 1000.0

Definition at line 15 of file CriGet4Mess001.h.

Referenced by critof001::Message::getMsgFullTimeD().

◆ kdEpochCycleInS

const double critof001::kdEpochCycleInS = static_cast<double>(kuEpochCounterSz + 1) * (kdEpochInNs / 1e9)

Definition at line 52 of file CriGet4Mess001.h.

◆ kdEpochInNs

const double critof001::kdEpochInNs = kdEpochInPs / 1000.0

Definition at line 40 of file CriGet4Mess001.h.

Referenced by critof001::Message::getMsgFullTimeD().

◆ kdEpochInPs

const double critof001::kdEpochInPs = static_cast<double>(kuCoarseCounterSize) * kdClockCycleSize

Definition at line 39 of file CriGet4Mess001.h.

◆ kdFtBinsNb

const double critof001::kdFtBinsNb = 112.

Definition at line 31 of file CriGet4Mess001.h.

Referenced by critof001::Message::getMsgFullTimeD().

◆ kdFtSize

const double critof001::kdFtSize = kuFineCounterSize

Definition at line 30 of file CriGet4Mess001.h.

◆ kdTotBinSize

const double critof001::kdTotBinSize = 50.0

Definition at line 17 of file CriGet4Mess001.h.

◆ kuChipIdMergedEpoch

const uint32_t critof001::kuChipIdMergedEpoch = 255

◆ kuCoarseCounterSize

const uint32_t critof001::kuCoarseCounterSize = ((kuCoarseTime >> kuCtShift) + 1)

Definition at line 26 of file CriGet4Mess001.h.

◆ kuCoarseOverflowTest

const uint32_t critof001::kuCoarseOverflowTest = kuCoarseCounterSize / 2

Definition at line 27 of file CriGet4Mess001.h.

◆ kuCoarseTime

const uint32_t critof001::kuCoarseTime = 0x0007FF80

Definition at line 21 of file CriGet4Mess001.h.

◆ kuCtShift

const uint32_t critof001::kuCtShift = 7

Definition at line 22 of file CriGet4Mess001.h.

◆ kuCtSize

const uint32_t critof001::kuCtSize = 12

Definition at line 23 of file CriGet4Mess001.h.

◆ kuEndOfMsMarker

const uint64_t critof001::kuEndOfMsMarker = 0xdeadbeeeeeef

Definition at line 63 of file CriGet4Mess001.h.

Referenced by critof001::Message::isEndOfMs().

◆ kuEndOfMsMask

const uint64_t critof001::kuEndOfMsMask = 0xFFFFFFFFFFFF

Definition at line 62 of file CriGet4Mess001.h.

Referenced by critof001::Message::isEndOfMs().

◆ kuEpochCounterSz

const uint32_t critof001::kuEpochCounterSz = 0xFFFFFF

Works as epoch integer in ns!

Definition at line 44 of file CriGet4Mess001.h.

◆ kuEpochInBins

const uint32_t critof001::kuEpochInBins = kuCoarseCounterSize * kdFtBinsNb

Definition at line 36 of file CriGet4Mess001.h.

◆ kuEpochInNs

◆ kuFeePulserChannel

const uint32_t critof001::kuFeePulserChannel = 3

Definition at line 59 of file CriGet4Mess001.h.

◆ kuFeePulserChannelDiam

const uint32_t critof001::kuFeePulserChannelDiam = 0

Definition at line 60 of file CriGet4Mess001.h.

◆ kuFineCounterSize

const uint32_t critof001::kuFineCounterSize = ((kuFineTime >> kuFtShift) + 1)

Definition at line 25 of file CriGet4Mess001.h.

◆ kuFineTime

const uint32_t critof001::kuFineTime = 0x0000007F

Definition at line 19 of file CriGet4Mess001.h.

◆ kuFtShift

const uint32_t critof001::kuFtShift = 0

Definition at line 20 of file CriGet4Mess001.h.

◆ kulEpochCycleBins

const uint64_t critof001::kulEpochCycleBins = kulEpochCycleEp * kuEpochInBins

Definition at line 48 of file CriGet4Mess001.h.

◆ kulEpochCycleEp

◆ kulEpochCycleFieldSz

const uint64_t critof001::kulEpochCycleFieldSz = 0x1FFFFF

Definition at line 55 of file CriGet4Mess001.h.

◆ kulEpochCycleInNs

const uint64_t critof001::kulEpochCycleInNs = kulEpochCycleBins * kuEpochInNs

Definition at line 50 of file CriGet4Mess001.h.

◆ kuTotCounterSize

const uint32_t critof001::kuTotCounterSize = 256

Definition at line 28 of file CriGet4Mess001.h.