CbmRoot
stsxyter::Message Class Reference

#include <StsXyterMessage.h>

Public Member Functions

 Message ()
 
 Message (const Message &src)
 
 Message (uint32_t uDataIn)
 
 ~Message ()
 
void assign (const Message &src)
 
Messageoperator= (const Message &src)
 
void reset ()
 
uint32_t GetData () const
 
void SetData (uint32_t uValue)
 
uint32_t GetField (uint32_t uShift, uint32_t uLen) const
 
uint8_t GetBit (uint32_t uShift) const
 
uint32_t GetFieldBE (uint32_t uShift, uint32_t uLen) const
 
uint8_t GetBitBE (uint32_t uShift) const
 
uint32_t DataBE () const
 
void SetField (uint32_t uShift, uint32_t uLen, uint32_t uValue)
 
void SetBit (uint32_t uShift, uint8_t uValue)
 
uint32_t GetField (MessField field) const
 
uint8_t GetBit (MessField field) const
 
bool GetFlag (MessField field) const
 
uint32_t GetFieldBE (MessField field) const
 
uint8_t GetBitBE (MessField field) const
 
void SetField (MessField field, uint32_t uValue)
 
void SetBit (MessField field, uint8_t ucValue)
 
uint16_t GetLinkIndex () const
 For all data: Returns the (global) index of the eLink on which the message was received (n bit field) More...
 
bool IsHit () const
 Check if the message if a Hit Message. More...
 
bool IsDummy () const
 Check if the message if a Dummy Hit Message. More...
 
bool IsTsMsb () const
 Check if the message if a Ts_Msb. More...
 
MessType GetMessType () const
 Returns the message type, see enum MessType. More...
 
uint16_t GetHitChannel () const
 For Hit data: Returns StsXYTER channel number (7 bit field) More...
 
uint16_t GetHitAdc () const
 For Hit data: Returns ADC value (5 bit field) More...
 
uint16_t GetHitTimeFull () const
 For Hit data: Returns Full timestamp (10 bit field including 2 bits overlap) More...
 
uint16_t GetHitTimeOver () const
 For Hit data: Returns timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message) More...
 
uint16_t GetHitTime () const
 For Hit data: Returns timestamp (8 bit field, 2 MSB bits overlap removed) More...
 
uint16_t GetHitTimeBinning () const
 
uint16_t GetLinkIndexHitBinning () const
 
bool IsHitMissedEvts () const
 For Hit data: Returns Missed event flag (1 bit field) More...
 
void SetHitChannel (uint16_t usVal)
 For Hit data: Sets StsXYTER channel number (7 bit field) More...
 
void SetHitAdc (uint16_t usVal)
 For Hit data: Sets ADC value (5 bit field) More...
 
void SetHitTimeFull (uint16_t usVal)
 For Hit data: Sets Full timestamp (10 bit field including 2 bits overlap) More...
 
void SetHitTimeOver (uint16_t usVal)
 For Hit data: Sets timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message) More...
 
void SetHitTime (uint16_t usVal)
 For Hit data: Sets Full timestamp (8 bit field, 2 MSB bits overlap removed) More...
 
void SetHitMissEvtsFlag (bool bVal)
 For Hit data: Sets Missed event flag (1 bit field) More...
 
MessSubType GetSubType () const
 For non-Hit data: Returns subtype (2 bit field) More...
 
uint32_t GetTsMsbVal () const
 For TS MSB data: Returns the TS MSB 22 bit field) More...
 
uint32_t GetTsMsbValBinning () const
 For TS MSB data: Returns the TS MSB 29 bit field) More...
 
void SetTsMsbVal (uint32_t uVal)
 For TS MSB data: Sets the TS MSB (22 bit field) More...
 
uint32_t GetEpochVal () const
 For Epoch data: Returns the Epoch (29 bit field) More...
 
void SetEpochVal (uint32_t uVal)
 For Epoch data: Sets the Epoch (29 bit field) More...
 
uint16_t GetStatusLink () const
 For Status data: Returns the Link Inedx (9 bit field) More...
 
uint16_t GetStatusSxTs () const
 For Status data: Returns the SMX TS from ACK frame (6 bit field) More...
 
uint16_t GetStatusStatus () const
 For Status data: Returns the Status field from ACK frame (4 bit field) More...
 
uint16_t GetStatusDpbTs () const
 For Status data: Returns the DPB TS when frame received (9 bit field) More...
 
bool IsCpFlagOn () const
 For Status data: Returns the CP flag from ACK frame (1 bit field) More...
 
void SetStatusLink (uint16_t usVal)
 For Status data: Sets the Status (9 bit field) More...
 
void SetStatusSxTs (uint16_t usVal)
 For Status data: Sets the Status (6 bit field) More...
 
void SetStatusStatus (uint16_t usVal)
 For Status data: Sets the Status (4 bit field) More...
 
void SetStatusDpbTs (uint16_t usVal)
 For Status data: Sets the Status (9 bit field) More...
 
void SetCpFlag (bool bVal)
 For Status data: Sets the Status (1 bit field) More...
 
bool IsEmptyMsg () const
 For Empty/End of MS data: Check if this is an empty message (1 bit field) More...
 
bool IsMsErrorFlagOn () const
 For End of MS data: Returns the MS error flag (1 bit field) More...
 
uint16_t GetMsErrorType () const
 For End of MS data: Returns the MS error type field (2 bit field) More...
 
void SetEmptyMsgFlag (bool bVal)
 For Empty/End of MS data data: Sets the Empty message flag (1 bit field) More...
 
void SetMsErrorFlag (bool bVal)
 For End of MS data data: Sets the MS Error flag (1 bit field) More...
 
void SetMsErrorType (uint16_t usVal)
 For End of MS data: Sets the MS error type field (2 bit field) More...
 
bool PrintMess (std::ostream &os, MessagePrintMask ctrl=MessagePrintMask::msg_print_Human) const
 

Protected Attributes

uint32_t fuData
 

Detailed Description

Definition at line 165 of file StsXyterMessage.h.

Constructor & Destructor Documentation

◆ Message() [1/3]

stsxyter::Message::Message ( )
inline

Definition at line 171 of file StsXyterMessage.h.

◆ Message() [2/3]

stsxyter::Message::Message ( const Message src)
inline

Definition at line 173 of file StsXyterMessage.h.

◆ Message() [3/3]

stsxyter::Message::Message ( uint32_t  uDataIn)
inline

Definition at line 175 of file StsXyterMessage.h.

◆ ~Message()

stsxyter::Message::~Message ( )
inline

Definition at line 177 of file StsXyterMessage.h.

Member Function Documentation

◆ assign()

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

Definition at line 179 of file StsXyterMessage.h.

References fuData.

Referenced by operator=().

◆ DataBE()

uint32_t stsxyter::Message::DataBE ( ) const
inline

Definition at line 206 of file StsXyterMessage.h.

References fuData.

Referenced by GetBitBE(), and GetFieldBE().

◆ GetBit() [1/2]

uint8_t stsxyter::Message::GetBit ( MessField  field) const
inline

Definition at line 227 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBit().

◆ GetBit() [2/2]

uint8_t stsxyter::Message::GetBit ( uint32_t  uShift) const
inline

Definition at line 196 of file StsXyterMessage.h.

References fuData.

Referenced by GetBit(), GetFlag(), and GetHitTimeBinning().

◆ GetBitBE() [1/2]

uint8_t stsxyter::Message::GetBitBE ( MessField  field) const
inline

Definition at line 236 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBitBE().

◆ GetBitBE() [2/2]

uint8_t stsxyter::Message::GetBitBE ( uint32_t  uShift) const
inline

Definition at line 203 of file StsXyterMessage.h.

References DataBE().

Referenced by GetBitBE().

◆ GetData()

uint32_t stsxyter::Message::GetData ( ) const
inline

◆ GetEpochVal()

uint32_t stsxyter::Message::GetEpochVal ( ) const
inline

For Epoch data: Returns the Epoch (29 bit field)

Definition at line 346 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldEpochVal().

Referenced by PrintMess().

◆ GetField() [1/2]

uint32_t stsxyter::Message::GetField ( MessField  field) const
inline

◆ GetField() [2/2]

◆ GetFieldBE() [1/2]

uint32_t stsxyter::Message::GetFieldBE ( MessField  field) const
inline

◆ GetFieldBE() [2/2]

uint32_t stsxyter::Message::GetFieldBE ( uint32_t  uShift,
uint32_t  uLen 
) const
inline

Definition at line 200 of file StsXyterMessage.h.

References DataBE().

Referenced by GetFieldBE().

◆ GetFlag()

bool stsxyter::Message::GetFlag ( MessField  field) const
inline

Definition at line 230 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and GetBit().

Referenced by GetMessType(), IsHit(), and IsHitMissedEvts().

◆ GetHitAdc()

◆ GetHitChannel()

◆ GetHitTime()

◆ GetHitTimeBinning()

uint16_t stsxyter::Message::GetHitTimeBinning ( ) const
inline

For Hit data: Returns timestamp (9 bit field + 1b extra on b30) => Quick and dirty hack for binning FW!!!

Definition at line 290 of file StsXyterMessage.h.

References GetBit(), GetField(), and stsxyter::kFieldHitTs().

Referenced by CbmMcbm2018MonitorMuchLite::FillHitInfo(), CbmMcbm2018MonitorSts::FillHitInfo(), CbmMcbm2018UnpackerAlgoMuch::ProcessHitInfo(), and CbmMcbm2018UnpackerAlgoSts::ProcessHitInfo().

◆ GetHitTimeFull()

uint16_t stsxyter::Message::GetHitTimeFull ( ) const
inline

For Hit data: Returns Full timestamp (10 bit field including 2 bits overlap)

Definition at line 280 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldHitTsFull().

Referenced by PrintMess().

◆ GetHitTimeOver()

uint16_t stsxyter::Message::GetHitTimeOver ( ) const
inline

For Hit data: Returns timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)

Definition at line 283 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldHitTsOver().

Referenced by CbmCosy2018MonitorPulser::FillHitInfo(), and PrintMess().

◆ GetLinkIndex()

◆ GetLinkIndexHitBinning()

uint16_t stsxyter::Message::GetLinkIndexHitBinning ( ) const
inline

For Hit data: Returns (global) index of the eLink on which the message was received (6 bit field) => Quick and dirty hack for binning FW!!!

Definition at line 296 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldLinkIndex().

Referenced by CbmMcbm2018UnpackerAlgoMuch::ProcessMs(), CbmMcbm2018UnpackerAlgoSts::ProcessMs(), CbmMcbm2018MonitorMuchLite::ProcessMuchMs(), and CbmMcbm2018MonitorSts::ProcessStsMs().

◆ GetMessType()

◆ GetMsErrorType()

uint16_t stsxyter::Message::GetMsErrorType ( ) const
inline

For End of MS data: Returns the MS error type field (2 bit field)

Definition at line 400 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldMsErrType().

Referenced by CbmMcbm2018MonitorMuchLite::ProcessMuchMs(), and CbmMcbm2018MonitorSts::ProcessStsMs().

◆ GetStatusDpbTs()

uint16_t stsxyter::Message::GetStatusDpbTs ( ) const
inline

For Status data: Returns the DPB TS when frame received (9 bit field)

Definition at line 364 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatDpbTs().

Referenced by PrintMess().

◆ GetStatusLink()

◆ GetStatusStatus()

uint16_t stsxyter::Message::GetStatusStatus ( ) const
inline

◆ GetStatusSxTs()

uint16_t stsxyter::Message::GetStatusSxTs ( ) const
inline

For Status data: Returns the SMX TS from ACK frame (6 bit field)

Definition at line 356 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatSxTs().

Referenced by PrintMess().

◆ GetSubType()

MessSubType Message::GetSubType ( ) const

For non-Hit data: Returns subtype (2 bit field)

Definition at line 20 of file StsXyterMessage.cxx.

References stsxyter::Empty, stsxyter::Epoch, GetField(), stsxyter::kFieldSubtype(), stsxyter::Status, and stsxyter::TsMsb.

Referenced by GetMessType(), and IsTsMsb().

◆ GetTsMsbVal()

◆ GetTsMsbValBinning()

uint32_t stsxyter::Message::GetTsMsbValBinning ( ) const
inline

◆ IsCpFlagOn()

bool stsxyter::Message::IsCpFlagOn ( ) const
inline

For Status data: Returns the CP flag from ACK frame (1 bit field)

Definition at line 367 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldStatCpFlag().

Referenced by PrintMess().

◆ IsDummy()

bool stsxyter::Message::IsDummy ( ) const
inline

Check if the message if a Dummy Hit Message.

Definition at line 253 of file StsXyterMessage.h.

References GetHitAdc(), and IsHit().

◆ IsEmptyMsg()

bool stsxyter::Message::IsEmptyMsg ( ) const
inline

For Empty/End of MS data: Check if this is an empty message (1 bit field)

Definition at line 394 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldEmptyFlag().

Referenced by GetMessType().

◆ IsHit()

bool stsxyter::Message::IsHit ( ) const
inline

Check if the message if a Hit Message.

Definition at line 251 of file StsXyterMessage.h.

References GetFlag(), and stsxyter::kFieldNotHitFlag().

Referenced by IsDummy(), and IsTsMsb().

◆ IsHitMissedEvts()

◆ IsMsErrorFlagOn()

bool stsxyter::Message::IsMsErrorFlagOn ( ) const
inline

For End of MS data: Returns the MS error flag (1 bit field)

Definition at line 397 of file StsXyterMessage.h.

References GetField(), and stsxyter::kFieldMsErrFlag().

Referenced by CbmMcbm2018MonitorMuchLite::ProcessMuchMs(), and CbmMcbm2018MonitorSts::ProcessStsMs().

◆ IsTsMsb()

bool stsxyter::Message::IsTsMsb ( ) const
inline

Check if the message if a Ts_Msb.

Definition at line 255 of file StsXyterMessage.h.

References GetSubType(), IsHit(), and stsxyter::TsMsb.

◆ operator=()

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

Definition at line 181 of file StsXyterMessage.h.

References assign().

◆ PrintMess()

◆ reset()

void stsxyter::Message::reset ( )
inline

Definition at line 186 of file StsXyterMessage.h.

References fuData.

◆ SetBit() [1/2]

void stsxyter::Message::SetBit ( MessField  field,
uint8_t  ucValue 
)
inline

Definition at line 243 of file StsXyterMessage.h.

References stsxyter::MessField::fusPos, and SetBit().

◆ SetBit() [2/2]

void stsxyter::Message::SetBit ( uint32_t  uShift,
uint8_t  uValue 
)
inline

Definition at line 218 of file StsXyterMessage.h.

References fuData.

Referenced by SetBit(), and SetHitMissEvtsFlag().

◆ SetCpFlag()

void stsxyter::Message::SetCpFlag ( bool  bVal)
inline

For Status data: Sets the Status (1 bit field)

Definition at line 390 of file StsXyterMessage.h.

References stsxyter::kFieldStatCpFlag(), and SetField().

◆ SetData()

void stsxyter::Message::SetData ( uint32_t  uValue)
inline

Definition at line 190 of file StsXyterMessage.h.

References fuData.

◆ SetEmptyMsgFlag()

void stsxyter::Message::SetEmptyMsgFlag ( bool  bVal)
inline

For Empty/End of MS data data: Sets the Empty message flag (1 bit field)

Definition at line 403 of file StsXyterMessage.h.

References stsxyter::kFieldEmptyFlag(), and SetField().

◆ SetEpochVal()

void stsxyter::Message::SetEpochVal ( uint32_t  uVal)
inline

For Epoch data: Sets the Epoch (29 bit field)

Definition at line 349 of file StsXyterMessage.h.

References stsxyter::kFieldEpochVal(), and SetField().

◆ SetField() [1/2]

void stsxyter::Message::SetField ( MessField  field,
uint32_t  uValue 
)
inline

◆ SetField() [2/2]

void stsxyter::Message::SetField ( uint32_t  uShift,
uint32_t  uLen,
uint32_t  uValue 
)
inline

◆ SetHitAdc()

void stsxyter::Message::SetHitAdc ( uint16_t  usVal)
inline

For Hit data: Sets ADC value (5 bit field)

Definition at line 309 of file StsXyterMessage.h.

References stsxyter::kFieldHitAdc(), and SetField().

◆ SetHitChannel()

void stsxyter::Message::SetHitChannel ( uint16_t  usVal)
inline

For Hit data: Sets StsXYTER channel number (7 bit field)

Definition at line 304 of file StsXyterMessage.h.

References stsxyter::kFieldHitChannel(), and SetField().

◆ SetHitMissEvtsFlag()

void stsxyter::Message::SetHitMissEvtsFlag ( bool  bVal)
inline

For Hit data: Sets Missed event flag (1 bit field)

Definition at line 325 of file StsXyterMessage.h.

References stsxyter::kFieldHitEmFlag(), and SetBit().

◆ SetHitTime()

void stsxyter::Message::SetHitTime ( uint16_t  usVal)
inline

For Hit data: Sets Full timestamp (8 bit field, 2 MSB bits overlap removed)

Definition at line 322 of file StsXyterMessage.h.

References stsxyter::kFieldHitTs(), and SetField().

◆ SetHitTimeFull()

void stsxyter::Message::SetHitTimeFull ( uint16_t  usVal)
inline

For Hit data: Sets Full timestamp (10 bit field including 2 bits overlap)

Definition at line 312 of file StsXyterMessage.h.

References stsxyter::kFieldHitTsFull(), and SetField().

◆ SetHitTimeOver()

void stsxyter::Message::SetHitTimeOver ( uint16_t  usVal)
inline

For Hit data: Sets timestamp overlap bits (2 bits field, overlap with 2 LSBs of TS_MSB message)

Definition at line 317 of file StsXyterMessage.h.

References stsxyter::kFieldHitTsOver(), and SetField().

◆ SetMsErrorFlag()

void stsxyter::Message::SetMsErrorFlag ( bool  bVal)
inline

For End of MS data data: Sets the MS Error flag (1 bit field)

Definition at line 406 of file StsXyterMessage.h.

References stsxyter::kFieldMsErrFlag(), and SetField().

◆ SetMsErrorType()

void stsxyter::Message::SetMsErrorType ( uint16_t  usVal)
inline

For End of MS data: Sets the MS error type field (2 bit field)

Definition at line 409 of file StsXyterMessage.h.

References stsxyter::kFieldMsErrType(), and SetField().

◆ SetStatusDpbTs()

void stsxyter::Message::SetStatusDpbTs ( uint16_t  usVal)
inline

For Status data: Sets the Status (9 bit field)

Definition at line 385 of file StsXyterMessage.h.

References stsxyter::kFieldStatDpbTs(), and SetField().

◆ SetStatusLink()

void stsxyter::Message::SetStatusLink ( uint16_t  usVal)
inline

For Status data: Sets the Status (9 bit field)

Definition at line 370 of file StsXyterMessage.h.

References stsxyter::kFieldStatLinkId(), and SetField().

◆ SetStatusStatus()

void stsxyter::Message::SetStatusStatus ( uint16_t  usVal)
inline

For Status data: Sets the Status (4 bit field)

Definition at line 380 of file StsXyterMessage.h.

References stsxyter::kFieldStatStatus(), and SetField().

◆ SetStatusSxTs()

void stsxyter::Message::SetStatusSxTs ( uint16_t  usVal)
inline

For Status data: Sets the Status (6 bit field)

Definition at line 375 of file StsXyterMessage.h.

References stsxyter::kFieldStatSxTs(), and SetField().

◆ SetTsMsbVal()

void stsxyter::Message::SetTsMsbVal ( uint32_t  uVal)
inline

For TS MSB data: Sets the TS MSB (22 bit field)

Definition at line 342 of file StsXyterMessage.h.

References stsxyter::kFieldTsMsbVal(), and SetField().

Member Data Documentation

◆ fuData

uint32_t stsxyter::Message::fuData
protected

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