CbmRoot
gdpbv100::Message Class Reference

#include <gDpbMessv100.h>

Inheritance diagram for gdpbv100::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. 4 bit. More...
 
void setMessageType (uint8_t v)
 Sets the message type field in the current message. More...
 
uint16_t getGdpbGenGdpbId () const
 
void setGdpbGenGdpbId (uint32_t v)
 
uint16_t getGdpbGenChipId () const
 
void setGdpbGenChipId (uint32_t v)
 
uint16_t getGdpbHitIs24b () const
 
uint16_t getGdpbHitChanId () const
 
uint32_t getGdpbHitFullTs () const
 
uint16_t getGdpbHitCoarse () const
 
uint16_t getGdpbHitFineTs () const
 
bool getGdpbHit24Edge () const
 
bool getGdpbHit32DllLck () const
 
uint16_t getGdpbHit32Tot () const
 
bool getGdpbEpLinkId () 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
 
uint16_t getStarTrigMsgIndex () const
 
uint64_t getGdpbTsMsbStarA () const
 
uint64_t getGdpbTsLsbStarB () const
 
uint64_t getStarTsMsbStarB () const
 
uint64_t getStarTsMidStarC () const
 
uint64_t getStarTsLsbStarD () const
 
uint32_t getStarFillerD () const
 12 bits in between are set to 0 More...
 
uint32_t getStarTrigCmdStarD () const
 
uint32_t getStarDaqCmdStarD () const
 
uint32_t getStarTokenStarD () 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)
 
void setStarTrigMsgIndex (uint8_t v)
 
void setGdpbTsMsbStarA (uint64_t fullGdpbTs)
 
void setGdpbTsLsbStarB (uint64_t fullGdpbTs)
 
void setStarTsMsbStarB (uint64_t fullStarTs)
 
void setStarTsMidStarC (uint64_t fullStarTs)
 
void setStarTsLsbStarD (uint64_t fullStarTs)
 
void setStarFillerD ()
 12 bits in between are set to 0 More...
 
void setStarTrigCmdStarD (uint8_t v)
 
void setStarDaqCmdStarD (uint8_t v)
 
void setStarTokenStarD (uint16_t v)
 
bool isHitMsg () const
 Returns true is message type is MSG_HIT (Get4 hit data) More...
 
bool isEpochMsg () const
 Returns true is message type is MSG_EPOCH (epoch2 marker) More...
 
bool isGet4SlCtrMsg () const
 Returns true is message type is MSG_SLOWC (GET4 Slow Control) More...
 
bool isSysMsg () const
 Returns true is message type is MSG_SYST (system message) More...
 
bool isStarTrigger () const
 Returns true is message type is MSG_STAR_TRI_A, _B, _C, _D (STAR Trigger message) More...
 
void printDataCout (unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
 Print message in human readable format to cout. More...
 
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. More...
 
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. More...
 
uint64_t getMsgFullTime (uint64_t epoch) const
 Returns expanded and adjusted time of message (in ns) More...
 
double getMsgFullTimeD (uint64_t epoch) const
 Returns expanded and adjusted time of message in double (in ns) More...
 
bool operator< (const gdpbv100::Message &other) const
 strict weak ordering operator, assumes same epoch for both messages More...
 
bool operator== (const gdpbv100::Message &other) const
 equality operator, assumes same epoch for both messages More...
 
bool operator!= (const gdpbv100::Message &other) const
 inequality operator, assumes same epoch for both messages More...
 

Static Public Member Functions

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

Protected Attributes

uint64_t data
 

Detailed Description

Definition at line 133 of file gDpbMessv100.h.

Constructor & Destructor Documentation

◆ Message() [1/3]

gdpbv100::Message::Message ( )
inline

Definition at line 139 of file gDpbMessv100.h.

◆ Message() [2/3]

gdpbv100::Message::Message ( const Message src)
inline

Definition at line 141 of file gDpbMessv100.h.

◆ Message() [3/3]

gdpbv100::Message::Message ( uint64_t  dataIn)
inline

Definition at line 143 of file gDpbMessv100.h.

◆ ~Message()

gdpbv100::Message::~Message ( )
inline

Definition at line 145 of file gDpbMessv100.h.

Member Function Documentation

◆ assign()

void gdpbv100::Message::assign ( const Message src)
inline

Definition at line 147 of file gDpbMessv100.h.

References data.

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

◆ CalcDistance()

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

Returns the time difference between two expanded time stamps.

Definition at line 136 of file gDpbMessv100.cxx.

◆ CalcDistanceD()

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

Returns the time difference between two expanded time stamps.

Definition at line 152 of file gDpbMessv100.cxx.

◆ dataBE()

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

Definition at line 192 of file gDpbMessv100.h.

References data.

Referenced by getBitBE(), and getFieldBE().

◆ FullTimeStamp()

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

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

Definition at line 348 of file gDpbMessv100.h.

◆ getBit()

◆ getBitBE()

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

Definition at line 189 of file gDpbMessv100.h.

References dataBE().

◆ getData()

◆ getField()

◆ getFieldBE()

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

Definition at line 186 of file gDpbMessv100.h.

References dataBE().

◆ getFieldLong()

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

◆ getGdpbEpDataLoss()

◆ getGdpbEpEpochLoss()

◆ getGdpbEpEpochNb()

◆ getGdpbEpLinkId()

bool gdpbv100::Message::getGdpbEpLinkId ( ) const
inline

◆ getGdpbEpMissmatch()

◆ getGdpbEpSync()

◆ getGdpbGenChipId()

◆ getGdpbGenGdpbId()

uint16_t gdpbv100::Message::getGdpbGenGdpbId ( ) const
inline

Definition at line 212 of file gDpbMessv100.h.

References getField().

◆ getGdpbHit24Edge()

bool gdpbv100::Message::getGdpbHit24Edge ( ) const
inline

Definition at line 224 of file gDpbMessv100.h.

References getBit().

◆ getGdpbHit32DllLck()

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

Definition at line 226 of file gDpbMessv100.h.

References getBit().

◆ getGdpbHit32Tot()

◆ getGdpbHitChanId()

◆ getGdpbHitCoarse()

uint16_t gdpbv100::Message::getGdpbHitCoarse ( ) const
inline

Definition at line 221 of file gDpbMessv100.h.

References getField().

◆ getGdpbHitFineTs()

uint16_t gdpbv100::Message::getGdpbHitFineTs ( ) const
inline

◆ getGdpbHitFullTs()

◆ getGdpbHitIs24b()

◆ getGdpbSlcChan()

◆ getGdpbSlcData()

◆ getGdpbSlcEdge()

◆ getGdpbSlcMess()

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

Definition at line 238 of file gDpbMessv100.h.

References getField().

◆ getGdpbSlcType()

◆ getGdpbSysErrChanId()

◆ getGdpbSysErrData()

◆ getGdpbSysErrEdge()

◆ getGdpbSysErrInfo()

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

Definition at line 250 of file gDpbMessv100.h.

References getField().

◆ getGdpbSysErrRoType()

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

Definition at line 248 of file gDpbMessv100.h.

References getBit().

◆ getGdpbSysErrUnused()

◆ getGdpbSysFwErrResync()

◆ getGdpbSysLinkId()

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

Definition at line 246 of file gDpbMessv100.h.

References getBit().

◆ getGdpbSysPattIndex()

◆ getGdpbSysPattPattern()

◆ getGdpbSysPattType()

◆ getGdpbSysSubType()

◆ getGdpbSysUnkwData()

◆ getGdpbTsLsbStarB()

◆ getGdpbTsMsbStarA()

◆ getMessageType()

◆ getMsgFullTime()

◆ getMsgFullTimeD()

◆ getStarDaqCmdStarD()

◆ getStarFillerD()

uint32_t gdpbv100::Message::getStarFillerD ( ) const
inline

12 bits in between are set to 0

Definition at line 275 of file gDpbMessv100.h.

References getField().

◆ getStarTokenStarD()

◆ getStarTrigCmdStarD()

◆ getStarTrigMsgIndex()

◆ getStarTsLsbStarD()

◆ getStarTsMidStarC()

◆ getStarTsMsbStarB()

◆ isEpochMsg()

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

Returns true is message type is MSG_EPOCH (epoch2 marker)

Definition at line 323 of file gDpbMessv100.h.

References getMessageType(), and gdpbv100::MSG_EPOCH.

◆ isGet4SlCtrMsg()

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

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

Definition at line 325 of file gDpbMessv100.h.

References getMessageType(), and gdpbv100::MSG_SLOWC.

◆ isHitMsg()

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

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

Definition at line 321 of file gDpbMessv100.h.

References getMessageType(), and gdpbv100::MSG_HIT.

◆ isStarTrigger()

◆ isSysMsg()

bool gdpbv100::Message::isSysMsg ( ) const
inline

Returns true is message type is MSG_SYST (system message)

Definition at line 327 of file gDpbMessv100.h.

References getMessageType(), and gdpbv100::MSG_SYST.

◆ operator!=()

bool gdpbv100::Message::operator!= ( const gdpbv100::Message other) const

inequality operator, assumes same epoch for both messages

Definition at line 93 of file gDpbMessv100.cxx.

References data.

◆ operator<()

bool gdpbv100::Message::operator< ( const gdpbv100::Message other) const

strict weak ordering operator, assumes same epoch for both messages

Definition at line 56 of file gDpbMessv100.cxx.

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

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

◆ operator=()

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

Definition at line 149 of file gDpbMessv100.h.

References assign().

◆ operator==()

bool gdpbv100::Message::operator== ( const gdpbv100::Message other) const

equality operator, assumes same epoch for both messages

Definition at line 88 of file gDpbMessv100.cxx.

References data.

◆ printData()

void gdpbv100::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 kFALSE and FairLogger if outType is kTRUE. 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 216 of file gDpbMessv100.cxx.

References gdpbv100::FormatHexPrintout(), gdpbv100::MSG_EPOCH, gdpbv100::MSG_HIT, gdpbv100::msg_print_Cout, gdpbv100::msg_print_Data, gdpbv100::msg_print_File, gdpbv100::msg_print_Hex, gdpbv100::msg_print_Human, gdpbv100::msg_print_Prefix, gdpbv100::MSG_SLOWC, gdpbv100::MSG_STAR_TRI_A, gdpbv100::MSG_STAR_TRI_B, gdpbv100::MSG_STAR_TRI_C, gdpbv100::MSG_STAR_TRI_D, gdpbv100::MSG_SYST, gdpbv100::SYS_GDPB_UNKWN, gdpbv100::SYS_GET4_ERROR, gdpbv100::SYS_GET4_SYNC_MISS, and gdpbv100::SYS_PATTERN.

◆ printDataCout()

void gdpbv100::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 172 of file gDpbMessv100.cxx.

References gdpbv100::msg_print_Cout.

Referenced by CbmMcbm2018MonitorTof::DoUnpack(), CbmStar2019MonitorTof::DoUnpack(), CbmMcbm2018TofTestFee::DoUnpack(), CbmMcbm2018MonitorTofPulser::DoUnpack(), CbmMcbm2018MonitorMcbmPulser::ProcessTofMs(), CbmMcbm2018MonitorMcbmRate::ProcessTofMs(), and CbmMcbm2018MonitorMcbmSync::ProcessTofMs().

◆ printDataLog()

void gdpbv100::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 185 of file gDpbMessv100.cxx.

References gdpbv100::msg_print_FairLog.

◆ reset()

void gdpbv100::Message::reset ( )
inline

Definition at line 154 of file gDpbMessv100.h.

References data.

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

◆ setBit()

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

Definition at line 180 of file gDpbMessv100.h.

References data.

◆ setData()

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

Definition at line 157 of file gDpbMessv100.h.

References data.

◆ setField()

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

◆ setFieldLong()

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

◆ setGdpbEpEpochNb()

◆ setGdpbGenChipId()

void gdpbv100::Message::setGdpbGenChipId ( uint32_t  v)
inline

◆ setGdpbGenGdpbId()

void gdpbv100::Message::setGdpbGenGdpbId ( uint32_t  v)
inline

Definition at line 213 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setGdpbSysPattIndex()

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

Definition at line 289 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setGdpbSysPattPattern()

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

Definition at line 290 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setGdpbSysPattType()

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

Definition at line 288 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setGdpbSysSubType()

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

Definition at line 286 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setGdpbTsLsbStarB()

void gdpbv100::Message::setGdpbTsLsbStarB ( uint64_t  fullGdpbTs)
inline

Definition at line 299 of file gDpbMessv100.h.

References setFieldLong().

◆ setGdpbTsMsbStarA()

void gdpbv100::Message::setGdpbTsMsbStarA ( uint64_t  fullGdpbTs)
inline

Definition at line 295 of file gDpbMessv100.h.

References setFieldLong().

◆ setMessageType()

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

Sets the message type field in the current message.

Definition at line 209 of file gDpbMessv100.h.

References setField(), and v.

Referenced by CbmStar2019EventBuilderEtofAlgo::CreateStatusMessage().

◆ setStarDaqCmdStarD()

void gdpbv100::Message::setStarDaqCmdStarD ( uint8_t  v)
inline

Definition at line 316 of file gDpbMessv100.h.

References setField(), and v.

◆ setStarFillerD()

void gdpbv100::Message::setStarFillerD ( )
inline

12 bits in between are set to 0

Definition at line 314 of file gDpbMessv100.h.

References setField().

◆ setStarTokenStarD()

void gdpbv100::Message::setStarTokenStarD ( uint16_t  v)
inline

Definition at line 317 of file gDpbMessv100.h.

References setField(), and v.

◆ setStarTrigCmdStarD()

void gdpbv100::Message::setStarTrigCmdStarD ( uint8_t  v)
inline

Definition at line 315 of file gDpbMessv100.h.

References setField(), and v.

◆ setStarTrigMsgIndex()

void gdpbv100::Message::setStarTrigMsgIndex ( uint8_t  v)
inline

Definition at line 293 of file gDpbMessv100.h.

References setField(), and v.

◆ setStarTsLsbStarD()

void gdpbv100::Message::setStarTsLsbStarD ( uint64_t  fullStarTs)
inline

Definition at line 310 of file gDpbMessv100.h.

References setFieldLong().

◆ setStarTsMidStarC()

void gdpbv100::Message::setStarTsMidStarC ( uint64_t  fullStarTs)
inline

Definition at line 306 of file gDpbMessv100.h.

References setFieldLong().

◆ setStarTsMsbStarB()

void gdpbv100::Message::setStarTsMsbStarB ( uint64_t  fullStarTs)
inline

Definition at line 302 of file gDpbMessv100.h.

References setFieldLong().

Member Data Documentation

◆ data

uint64_t gdpbv100::Message::data
protected

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