CbmRoot
Loading...
Searching...
No Matches
critof001::Message Class Reference

#include <CriGet4Mess001.h>

Inheritance diagram for critof001::Message:
[legend]

Public Member Functions

 Message ()
 
 Message (const Message &src)
 
 Message (uint64_t dataIn)
 
 ~Message ()
 
void assign (const Message &src)
 
Messageoperator= (const Message &src)
 
void reset ()
 
uint64_t getData () const
 
void setData (uint64_t value)
 
uint64_t getFieldLong (uint32_t shift, uint32_t len) const
 
uint32_t getField (uint32_t shift, uint32_t len) const
 
void setField (uint32_t shift, uint32_t len, uint32_t value)
 
void setFieldLong (uint32_t shift, uint32_t len, uint64_t value)
 
uint8_t getBit (uint32_t shift) const
 
void setBit (uint32_t shift, uint8_t value)
 
uint32_t getFieldBE (uint32_t shift, uint32_t len) const
 
uint8_t getBitBE (uint32_t shift) const
 
uint64_t dataBE () const
 
uint8_t getMessageType () const
 Returns the message type. Valid for all message types. 2 bit.
 
void setMessageType (uint8_t v)
 Sets the message type field in the current message.
 
uint16_t getDebugTimer () const
 
void setDebugTimer (uint32_t v)
 
uint16_t getGet4Idx () const
 
void setGet4Id (uint32_t v)
 
uint16_t getGdpbHitChanId () const
 
uint32_t getGdpbHitFullTs () const
 
bool getGdpbHit32DllLck () const
 
uint16_t getGdpbHit32Tot () const
 
uint32_t getGdpbEpEpochNb () const
 
bool getGdpbEpSync () const
 
bool getGdpbEpDataLoss () const
 
bool getGdpbEpEpochLoss () const
 
bool getGdpbEpMissmatch () const
 
uint32_t getGdpbSlcMess () const
 
uint32_t getGdpbSlcChan () const
 
uint32_t getGdpbSlcEdge () const
 
uint32_t getGdpbSlcType () const
 
uint32_t getGdpbSlcData () const
 
uint16_t getGdpbSysSubType () const
 
bool getGdpbSysLinkId () const
 
bool getGdpbSysErrRoType () const
 
uint16_t getGdpbSysErrUnused () const
 
uint16_t getGdpbSysErrInfo () const
 
uint16_t getGdpbSysErrChanId () const
 
bool getGdpbSysErrEdge () const
 
uint16_t getGdpbSysErrData () const
 
uint32_t getGdpbSysUnkwData () const
 
uint32_t getGdpbSysFwErrResync () const
 
uint16_t getGdpbSysPattType () const
 
uint16_t getGdpbSysPattIndex () const
 
uint32_t getGdpbSysPattPattern () const
 
void setGdpbEpEpochNb (uint32_t v)
 
void setGdpbSysSubType (uint16_t v)
 
void setGdpbSysPattType (uint16_t v)
 
void setGdpbSysPattIndex (uint16_t v)
 
void setGdpbSysPattPattern (uint32_t v)
 
bool isHitMsg () const
 Returns true is message type is MSG_HIT (Get4 hit data)
 
bool isEpochMsg () const
 Returns true is message type is MSG_EPOCH (epoch2 marker)
 
bool isGet4SlCtrMsg () const
 Returns true is message type is MSG_SLOWC (GET4 Slow Control)
 
bool isSystem () const
 Returns true is message type is #MSG_ERROR (error message)
 
bool isEndOfMs () const
 Returns true is message type is an EndOfMs marker.
 
void printDataCout (unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
 Print message in human readable format to cout.
 
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.
 
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.
 
uint64_t getMsgFullTime (uint64_t epoch) const
 Returns expanded and adjusted time of message (in ns)
 
double getMsgFullTimeD (uint64_t epoch) const
 Returns expanded and adjusted time of message in double (in ns)
 
bool operator< (const critof001::Message &other) const
 strict weak ordering operator, assumes same epoch for both messages
 
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
 

Static Public Member Functions

static uint64_t FullTimeStamp (uint64_t epoch, uint32_t ts)
 Expanded timestamp for 160 MHz * 19 bit (12 + 7) epochs.
 
static uint64_t CalcDistance (uint64_t start, uint64_t stop)
 Returns the time difference between two expanded time stamps.
 
static double CalcDistanceD (double start, double stop)
 Returns the time difference between two expanded time stamps.
 

Protected Attributes

uint64_t data
 

Detailed Description

Definition at line 138 of file CriGet4Mess001.h.

Constructor & Destructor Documentation

◆ Message() [1/3]

critof001::Message::Message ( )
inline

Definition at line 144 of file CriGet4Mess001.h.

◆ Message() [2/3]

critof001::Message::Message ( const Message & src)
inline

Definition at line 146 of file CriGet4Mess001.h.

◆ Message() [3/3]

critof001::Message::Message ( uint64_t dataIn)
inline

Definition at line 148 of file CriGet4Mess001.h.

◆ ~Message()

critof001::Message::~Message ( )
inline

Definition at line 150 of file CriGet4Mess001.h.

Member Function Documentation

◆ assign()

void critof001::Message::assign ( const Message & src)
inline

Definition at line 152 of file CriGet4Mess001.h.

References data.

Referenced by critof001::FullMessage::assign(), and operator=().

◆ CalcDistance()

uint64_t critof001::Message::CalcDistance ( uint64_t start,
uint64_t stop )
static

Returns the time difference between two expanded time stamps.

Definition at line 120 of file CriGet4Mess001.cxx.

◆ CalcDistanceD()

double critof001::Message::CalcDistanceD ( double start,
double stop )
static

Returns the time difference between two expanded time stamps.

Definition at line 137 of file CriGet4Mess001.cxx.

◆ dataBE()

uint64_t critof001::Message::dataBE ( ) const
inline

Definition at line 200 of file CriGet4Mess001.h.

References data.

Referenced by getBitBE(), and getFieldBE().

◆ FullTimeStamp()

static uint64_t critof001::Message::FullTimeStamp ( uint64_t epoch,
uint32_t ts )
inlinestatic

Expanded timestamp for 160 MHz * 19 bit (12 + 7) epochs.

Definition at line 294 of file CriGet4Mess001.h.

◆ getBit()

uint8_t critof001::Message::getBit ( uint32_t shift) const
inline

◆ getBitBE()

uint8_t critof001::Message::getBitBE ( uint32_t shift) const
inline

Definition at line 199 of file CriGet4Mess001.h.

References dataBE().

◆ getData()

uint64_t critof001::Message::getData ( ) const
inline

Definition at line 162 of file CriGet4Mess001.h.

References data.

Referenced by CbmTofUnpackAlgo::ProcessEpoch().

◆ getDebugTimer()

uint16_t critof001::Message::getDebugTimer ( ) const
inline

Definition at line 217 of file CriGet4Mess001.h.

References getField().

◆ getField()

◆ getFieldBE()

uint32_t critof001::Message::getFieldBE ( uint32_t shift,
uint32_t len ) const
inline

Definition at line 195 of file CriGet4Mess001.h.

References dataBE().

◆ getFieldLong()

uint64_t critof001::Message::getFieldLong ( uint32_t shift,
uint32_t len ) const
inline

Definition at line 165 of file CriGet4Mess001.h.

References data.

◆ getGdpbEpDataLoss()

bool critof001::Message::getGdpbEpDataLoss ( ) const
inline

Definition at line 231 of file CriGet4Mess001.h.

References getBit().

Referenced by CbmTofUnpackAlgo::ProcessEpoch().

◆ getGdpbEpEpochLoss()

bool critof001::Message::getGdpbEpEpochLoss ( ) const
inline

Definition at line 232 of file CriGet4Mess001.h.

References getBit().

Referenced by CbmTofUnpackAlgo::ProcessEpoch().

◆ getGdpbEpEpochNb()

uint32_t critof001::Message::getGdpbEpEpochNb ( ) const
inline

◆ getGdpbEpMissmatch()

bool critof001::Message::getGdpbEpMissmatch ( ) const
inline

Definition at line 233 of file CriGet4Mess001.h.

References getBit().

Referenced by CbmTofUnpackAlgo::ProcessEpoch().

◆ getGdpbEpSync()

bool critof001::Message::getGdpbEpSync ( ) const
inline

Definition at line 230 of file CriGet4Mess001.h.

References getBit().

Referenced by CbmTofUnpackAlgo::ProcessEpoch().

◆ getGdpbHit32DllLck()

bool critof001::Message::getGdpbHit32DllLck ( ) const
inline

Definition at line 225 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbHit32Tot()

uint16_t critof001::Message::getGdpbHit32Tot ( ) const
inline

◆ getGdpbHitChanId()

uint16_t critof001::Message::getGdpbHitChanId ( ) const
inline

◆ getGdpbHitFullTs()

uint32_t critof001::Message::getGdpbHitFullTs ( ) const
inline

Definition at line 224 of file CriGet4Mess001.h.

References getField().

Referenced by operator<().

◆ getGdpbSlcChan()

uint32_t critof001::Message::getGdpbSlcChan ( ) const
inline

Definition at line 237 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSlcData()

uint32_t critof001::Message::getGdpbSlcData ( ) const
inline

Definition at line 240 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSlcEdge()

uint32_t critof001::Message::getGdpbSlcEdge ( ) const
inline

Definition at line 238 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbSlcMess()

uint32_t critof001::Message::getGdpbSlcMess ( ) const
inline

Definition at line 236 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSlcType()

uint32_t critof001::Message::getGdpbSlcType ( ) const
inline

Definition at line 239 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysErrChanId()

uint16_t critof001::Message::getGdpbSysErrChanId ( ) const
inline

Definition at line 249 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysErrData()

uint16_t critof001::Message::getGdpbSysErrData ( ) const
inline

Definition at line 251 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysErrEdge()

bool critof001::Message::getGdpbSysErrEdge ( ) const
inline

Definition at line 250 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbSysErrInfo()

uint16_t critof001::Message::getGdpbSysErrInfo ( ) const
inline

Definition at line 248 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysErrRoType()

bool critof001::Message::getGdpbSysErrRoType ( ) const
inline

Definition at line 246 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbSysErrUnused()

uint16_t critof001::Message::getGdpbSysErrUnused ( ) const
inline

Definition at line 247 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysFwErrResync()

uint32_t critof001::Message::getGdpbSysFwErrResync ( ) const
inline

Definition at line 255 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbSysLinkId()

bool critof001::Message::getGdpbSysLinkId ( ) const
inline

Definition at line 244 of file CriGet4Mess001.h.

References getBit().

◆ getGdpbSysPattIndex()

uint16_t critof001::Message::getGdpbSysPattIndex ( ) const
inline

Definition at line 258 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysPattPattern()

uint32_t critof001::Message::getGdpbSysPattPattern ( ) const
inline

Definition at line 259 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysPattType()

uint16_t critof001::Message::getGdpbSysPattType ( ) const
inline

Definition at line 257 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysSubType()

uint16_t critof001::Message::getGdpbSysSubType ( ) const
inline

Definition at line 243 of file CriGet4Mess001.h.

References getField().

◆ getGdpbSysUnkwData()

uint32_t critof001::Message::getGdpbSysUnkwData ( ) const
inline

Definition at line 253 of file CriGet4Mess001.h.

References getField().

◆ getGet4Idx()

uint16_t critof001::Message::getGet4Idx ( ) const
inline

◆ getMessageType()

uint8_t critof001::Message::getMessageType ( ) const
inline

Returns the message type. Valid for all message types. 2 bit.

Definition at line 211 of file CriGet4Mess001.h.

References getField().

Referenced by isEpochMsg(), isGet4SlCtrMsg(), isHitMsg(), isSystem(), operator<(), and CbmTofUnpackAlgo::unpack().

◆ getMsgFullTime()

uint64_t critof001::Message::getMsgFullTime ( uint64_t epoch) const

Returns expanded and adjusted time of message (in ns)

Definition at line 95 of file CriGet4Mess001.cxx.

◆ getMsgFullTimeD()

◆ isEndOfMs()

bool critof001::Message::isEndOfMs ( ) const
inline

Returns true is message type is an EndOfMs marker.

Definition at line 281 of file CriGet4Mess001.h.

References data, critof001::kuEndOfMsMarker, and critof001::kuEndOfMsMask.

◆ isEpochMsg()

bool critof001::Message::isEpochMsg ( ) const
inline

Returns true is message type is MSG_EPOCH (epoch2 marker)

Definition at line 275 of file CriGet4Mess001.h.

References getMessageType(), and critof001::MSG_EPOCH.

◆ isGet4SlCtrMsg()

bool critof001::Message::isGet4SlCtrMsg ( ) const
inline

Returns true is message type is MSG_SLOWC (GET4 Slow Control)

Definition at line 277 of file CriGet4Mess001.h.

References getMessageType(), and critof001::MSG_SLOWC.

◆ isHitMsg()

bool critof001::Message::isHitMsg ( ) const
inline

Returns true is message type is MSG_HIT (Get4 hit data)

Definition at line 273 of file CriGet4Mess001.h.

References getMessageType(), and critof001::MSG_HIT.

◆ isSystem()

bool critof001::Message::isSystem ( ) const
inline

Returns true is message type is #MSG_ERROR (error message)

Definition at line 279 of file CriGet4Mess001.h.

References getMessageType(), and critof001::MSG_SYST.

◆ operator!=()

bool critof001::Message::operator!= ( const critof001::Message & other) const

inequality operator, assumes same epoch for both messages

Definition at line 92 of file CriGet4Mess001.cxx.

References data.

◆ operator<()

bool critof001::Message::operator< ( const critof001::Message & other) const

strict weak ordering operator, assumes same epoch for both messages

Definition at line 60 of file CriGet4Mess001.cxx.

References getGdpbHitFullTs(), getMessageType(), and critof001::MSG_HIT.

Referenced by critof001::FullMessage::operator<().

◆ operator=()

Message & critof001::Message::operator= ( const Message & src)
inline

Definition at line 154 of file CriGet4Mess001.h.

References assign().

◆ operator==()

bool critof001::Message::operator== ( const critof001::Message & other) const

equality operator, assumes same epoch for both messages

Definition at line 89 of file CriGet4Mess001.cxx.

References data.

◆ printData()

void critof001::Message::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.

Prints a one line representation of the message in to a stream, selected by outType. The stream is cout if outType is false and FairLogger if outType is true. The parameter kind is mask with 4 bits

If bit msg_print_Human in kind is not set, raw format output is generated. All data fields are shown in hexadecimal. This is the format of choice when chasing hardware problems at the bit level.

If bit msg_print_Human is set, a more human readable output is generated. The timestamp is shown as fully extended and adjusted time as returned by the getMsgFullTime(uint32_t) const method. All data fields are represented in decimal.

Parameters
osoutput stream
kindmask determing output format
epochcurrent epoch number (from last epoch message)

Definition at line 201 of file CriGet4Mess001.cxx.

References critof001::MSG_EPOCH, critof001::MSG_HIT, critof001::msg_print_Cout, critof001::msg_print_Data, critof001::msg_print_File, critof001::msg_print_Hex, critof001::msg_print_Human, and critof001::msg_print_Prefix.

◆ printDataCout()

void critof001::Message::printDataCout ( unsigned kind = msg_print_Prefix | msg_print_Data,
uint32_t epoch = 0 ) const

Print message in human readable format to cout.

Prints a one line representation of the message in to cout. See printData(std::ostream&, unsigned, uint32_t) const for full documentation.

Definition at line 158 of file CriGet4Mess001.cxx.

References critof001::msg_print_Cout.

Referenced by CbmCriGet4RawPrint::DoUnpack().

◆ printDataLog()

void critof001::Message::printDataLog ( unsigned kind = msg_print_Prefix | msg_print_Data,
uint32_t epoch = 0 ) const

Print message in human readable format to the Fairroot logger.

Prints a one line representation of the message in to the Fairroot logger. TODO: Add coloring of possible See printData(std::ostream&, unsigned, uint32_t) const for full documentation.

Definition at line 169 of file CriGet4Mess001.cxx.

References critof001::msg_print_FairLog.

◆ reset()

void critof001::Message::reset ( )
inline

Definition at line 160 of file CriGet4Mess001.h.

References data.

Referenced by critof001::FullMessage::reset().

◆ setBit()

void critof001::Message::setBit ( uint32_t shift,
uint8_t value )
inline

Definition at line 189 of file CriGet4Mess001.h.

References data.

◆ setData()

void critof001::Message::setData ( uint64_t value)
inline

Definition at line 163 of file CriGet4Mess001.h.

References data.

◆ setDebugTimer()

void critof001::Message::setDebugTimer ( uint32_t v)
inline

Definition at line 218 of file CriGet4Mess001.h.

References setField(), and v.

◆ setField()

void critof001::Message::setField ( uint32_t shift,
uint32_t len,
uint32_t value )
inline

◆ setFieldLong()

void critof001::Message::setFieldLong ( uint32_t shift,
uint32_t len,
uint64_t value )
inline

Definition at line 181 of file CriGet4Mess001.h.

References data.

◆ setGdpbEpEpochNb()

void critof001::Message::setGdpbEpEpochNb ( uint32_t v)
inline

Definition at line 262 of file CriGet4Mess001.h.

References setField(), and v.

◆ setGdpbSysPattIndex()

void critof001::Message::setGdpbSysPattIndex ( uint16_t v)
inline

Definition at line 268 of file CriGet4Mess001.h.

References setField(), and v.

◆ setGdpbSysPattPattern()

void critof001::Message::setGdpbSysPattPattern ( uint32_t v)
inline

Definition at line 269 of file CriGet4Mess001.h.

References setField(), and v.

◆ setGdpbSysPattType()

void critof001::Message::setGdpbSysPattType ( uint16_t v)
inline

Definition at line 267 of file CriGet4Mess001.h.

References setField(), and v.

◆ setGdpbSysSubType()

void critof001::Message::setGdpbSysSubType ( uint16_t v)
inline

Definition at line 265 of file CriGet4Mess001.h.

References setField(), and v.

◆ setGet4Id()

void critof001::Message::setGet4Id ( uint32_t v)
inline

Definition at line 220 of file CriGet4Mess001.h.

References setField(), and v.

◆ setMessageType()

void critof001::Message::setMessageType ( uint8_t v)
inline

Sets the message type field in the current message.

Definition at line 214 of file CriGet4Mess001.h.

References setField(), and v.

Member Data Documentation

◆ data

uint64_t critof001::Message::data
protected

The documentation for this class was generated from the following files: