Public Member Functions | Static Public Member Functions | Protected Attributes

roc::Message Class Reference

#include <Message.h>

Public Member Functions

 Message ()
 Message (const Message &src)
void assign (const Message &src)
Messageoperator= (const Message &src)
void reset ()
uint32_t getField (uint32_t shift, uint32_t len) const
void setField (uint32_t shift, uint32_t len, uint32_t value)
uint8_t getBit (uint32_t shift) const
void setBit (uint32_t shift, uint8_t value)
uint8_t getMessageType () const
 Returns the message type. Valid for all message types. 4 bit.
uint16_t getRocNumber () const
 Returns the number of the sending ROC. Valid for all message types.
void setMessageType (uint8_t v)
 Sets the message type field in the current message.
void setRocNumber (uint16_t v)
 Sets the ROC number field in the current message.
uint8_t getNxNumber () const
 For Hit data: Returns nXYTER number (2 bit field).
uint8_t getNxLtsMsb () const
 For Hit data: Returns 3 most significant bits of ROC LTS (3 bit field).
uint16_t getNxTs () const
 For Hit data: Returns nXYTER time stamp (14 bit field).
uint8_t getNxChNum () const
 For Hit data: Returns nXYTER channel number (7 bit field).
uint16_t getNxAdcValue () const
 For Hit data: Returns ADC value (12 bit field).
uint8_t getNxPileup () const
 For Hit data: Returns nXYTER pileup flag (1 bit field).
uint8_t getNxOverflow () const
 For Hit data: Returns nXYTER overflow flag (1 bit field).
uint8_t getNxLastEpoch () const
 For Hit data: Returns nXYTER last-epoch flag (1 bit field).
void setNxNumber (uint8_t v)
 For Hit data: Sets nXYTER number (2 bit field).
void setNxLtsMsb (uint8_t v)
 For Hit data: Sets 3 most significant bits of ROC LTS (3 bit field).
void setNxTs (uint16_t v)
 For Hit data: Sets nXYTER time stamp (14 bit field).
void setNxChNum (uint8_t v)
 For Hit data: Sets nXYTER channel number (7 bit field).
void setNxAdcValue (uint16_t v)
 For Hit data: Sets ADC value (12 bit field).
void setNxPileup (uint8_t v)
 For Hit data: Sets nXYTER pileup flag (1 bit field).
void setNxOverflow (uint8_t v)
 For Hit data: Sets nXYTER overflow flag (1 bit field).
void setNxLastEpoch (uint8_t v)
 For Hit data: Sets nXYTER last-epoch flag (1 bit field).
uint32_t getEpochNumber () const
 For Epoch data: Returns current epoch number (32 bit field).
uint8_t getEpochMissed () const
 For Epoch data: Returns number of missed hits (8 bit field).
void setEpochNumber (uint32_t v)
 For Epoch data: Sets epoch number (32 bit field).
void setEpochMissed (uint8_t v)
 For Epoch data: Sets missed hits count (8 bit field).
uint8_t getSyncChNum () const
 For Sync data: Returns sync channel number (2 bit field).
uint16_t getSyncTs () const
 For Sync data: Returns sync time stamp (13 bit field, 2 ns bins).
uint8_t getSyncEpochLSB () const
 For Sync data: Returns LSB of true epoch (1 bit field).
uint32_t getSyncData () const
 For Sync data: Returns sync message data (24 bit field).
uint8_t getSyncStFlag () const
 For Sync data: Returns sync status flags (2 bit field).
void setSyncChNum (uint8_t v)
 For Sync data: Set sync channel number (2 bit field).
void setSyncTs (uint16_t v)
 For Sync data: Set sync time stamp (13 bit field, 2 ns bins ).
void setSyncEpochLSB (uint8_t v)
 For Sync data: Set LSB of true epoch (1 bit field).
void setSyncData (uint32_t v)
 For Sync data: Set sync message data (24 bit field).
void setSyncStFlag (uint8_t v)
 For Sync data: Set sync status flags (2 bit field).
uint8_t getAuxChNum () const
 For Aux data: Returns aux channel number (7 bit field).
uint16_t getAuxTs () const
 For Aux data: Returns aux time stamp (13 bit field, 2 ns bins).
uint8_t getAuxEpochLSB () const
 For Aux data: Returns LSB of true epoch (1 bit field).
uint8_t getAuxFalling () const
 For Aux data: Returns falling edge flag (1 bit flag).
uint8_t getAuxOverflow () const
 For Aux data: Returns overflow flag (1 bit field).
void setAuxChNum (uint8_t v)
 For Aux data: Set aux channel number (7 bit field).
void setAuxTs (uint16_t v)
 For Aux data: Set aux time stamp (13 bit field).
void setAuxEpochLSB (uint8_t v)
 For Aux data: Set LSB of true epoch (1 bit field).
void setAuxFalling (uint8_t v)
 For Aux data: Set falling edge flag (1 bit flag).
void setAuxOverflow (uint8_t v)
 For Aux data: Set overflow flag (1 bit field).
uint32_t getEpoch2EpochMissmatch () const
 ROC timestamp and timestamp send by GET4 did not match) (1 bit field).
uint32_t getEpoch2EpochLost () const
 For Epoch2 data: Returns epoch-lost flag (1 bit field).
uint32_t getEpoch2DataLost () const
 For Epoch2 data: Returns data-lost flag (1 bit field).
uint32_t getEpoch2Sync () const
 For Epoch2 data: Returns sync flag (1 bit field).
uint32_t getEpoch2StampTime () const
uint32_t getEpoch2Number () const
 For Epoch2 data: Returns the epoch number (28 bit field).
uint32_t getEpoch2ChipNumber () const
 the epoche message (8 bit field)
uint32_t getEpoch2CRC () const
 (not yet implemented in HW) (8 bit field)
void setEpoch2EpochMissmatch (uint32_t v)
 For Epoch2 data: Set epoch missmatch flag (1 bit field).
void setEpoch2EpochLost (uint32_t v)
 For Epoch2 data: Set epoch-lost flag (1 bit field).
void setEpoch2DataLost (uint32_t v)
 For Epoch2 data: Set data-lost flag (1 bit field).
void setEpoch2Sync (uint32_t v)
 For Epoch2 data: Set sync flag (1 bit field).
void setEpoch2StampTime (uint32_t v)
void setEpoch2Number (uint32_t v)
 For Epoch2 data: Set the epoch number (20 bit field).
void setEpoch2ChipNumber (uint32_t v)
 the epoche message (8 bit field)
void setEpoch2CRC (uint32_t v)
 (not yet implemented in HW) (8 bit field)
uint8_t getGet4Number () const
 For Get4 data: Returns Get4 chip number (6 bit field).
uint8_t getGet4ChNum () const
 For Get4 data: Returns Get4 channel number (2 bit field).
uint32_t getGet4Ts () const
 For Get4 data: Returns Get4 time stamp, 50 ps binning (19 bit field).
uint32_t getGet4Edge () const
 For Get4 data: Returns Get4 rising or falling edge (1 bit field).
uint32_t getGet4CRC () const
 For details check the ROC documentation. (8 bit field).
void setGet4Number (uint8_t v)
 For Get4 data: Sets Get4 chip number (6 bit field).
void setGet4ChNum (uint8_t v)
 For Get4 data: Sets Get4 channel number (2 bit field).
void setGet4Ts (uint32_t v)
 For Get4 data: Sets Get4 time stamp, 50 ps binning (19 bit field).
void setGet4Edge (uint32_t v)
 For Get4 data: Sets Get4 rising or falling edge (1 bit field).
void setGet4CRC (uint32_t v)
 For details check the ROC documentation. (8 bit field).
uint8_t getSysMesType () const
 For SysMes data: Returns system message subtype (8 bit field).
uint32_t getSysMesData () const
 For SysMes data: Returns system message data (32 bit field).
void setSysMesType (uint8_t v)
 For SysMes data: Set system message type (8 bit field).
void setSysMesData (uint32_t v)
 For SysMes data: Set system message data (32 bit field).
bool isNopMsg () const
 Returns true is message type is MSG_NOP (filler message).
bool isHitMsg () const
 Returns true is message type is MSG_HIT (nXYTER hit data).
bool isEpochMsg () const
 Returns true is message type is MSG_EPOCH (epoch marker).
bool isSyncMsg () const
 Returns true is message type is MSG_SYNC.
bool isAuxMsg () const
 Returns true is message type is MSG_AUX.
bool isEpoch2Msg () const
 Returns true is message type is MSG_EPOCH2 (epoch2 marker).
bool isGet4Msg () const
 Returns true is message type is MSG_GET4 (Get4 hit data).
bool isSysMsg () const
 Returns true is message type is MSG_SYS (system message).
bool isStartDaqMsg () const
 Returns true if system message and subtype ROC_SYSMSG_DAQ_START.
bool isStopDaqMsg () const
 Returns true if system message and subtype ROC_SYSMSG_DAQ_FINISH.
void printData (unsigned kind=msg_print_Prefix|msg_print_Data, uint32_t epoch=0) const
 Print message in human readable format to cout.
void printData (std::ostream &os, unsigned kind=msg_print_Human, uint32_t epoch=0) const
 Print message in binary or human readable format to a stream.
uint64_t getMsgFullTime (uint32_t epoch) const
double getMsgFullTimeD (uint32_t epoch) const
bool convertFromOld (void *src)
bool convertToOld (void *tgt)
bool assign (void *src, int fmt=formatNormal)
bool copyto (void *tgt, int fmt=formatNormal)

Static Public Member Functions

static uint64_t FullTimeStamp (uint32_t epoch, uint16_t stamp)
 Expanded timestamp for 250 MHz * 14 bit epochs.
static uint64_t FullTimeStamp2 (uint32_t epoch, uint32_t stamp)
 Expanded timestamp for 250/8*5 MHz * 19 bit 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.
static uint32_t RawSize (int fmt)

Protected Attributes

uint64_t data

Detailed Description

Definition at line 59 of file Message.h.


Constructor & Destructor Documentation

roc::Message::Message (  )  [inline]

Definition at line 65 of file Message.h.

roc::Message::Message ( const Message src  )  [inline]

Definition at line 67 of file Message.h.


Member Function Documentation

void roc::Message::assign ( const Message src  )  [inline]
bool roc::Message::assign ( void *  src,
int  fmt = formatNormal 
)
uint64_t roc::Message::CalcDistance ( uint64_t  start,
uint64_t  stop 
) [static]

Returns the time difference between two expanded time stamps.

Definition at line 173 of file Message.cxx.

Referenced by roc::CombinerModule::FindNextEvent(), TCosyDec10Proc::ProcessRocMsg(), and TCernNov10Proc::ProcessRocMsg().

double roc::Message::CalcDistanceD ( double  start,
double  stop 
) [static]

Returns the time difference between two expanded time stamps.

Definition at line 190 of file Message.cxx.

bool roc::Message::convertFromOld ( void *  src  ) 
bool roc::Message::convertToOld ( void *  tgt  ) 
bool roc::Message::copyto ( void *  tgt,
int  fmt = formatNormal 
)
static uint64_t roc::Message::FullTimeStamp ( uint32_t  epoch,
uint16_t  stamp 
) [inline, static]

Expanded timestamp for 250 MHz * 14 bit epochs.

Definition at line 440 of file Message.h.

Referenced by getMsgFullTime().

static uint64_t roc::Message::FullTimeStamp2 ( uint32_t  epoch,
uint32_t  stamp 
) [inline, static]
uint8_t roc::Message::getAuxChNum (  )  const [inline]
uint8_t roc::Message::getAuxEpochLSB (  )  const [inline]

For Aux data: Returns LSB of true epoch (1 bit field).

Definition at line 264 of file Message.h.

References getBit().

Referenced by roc::Sorter::addData(), convertToOld(), getMsgFullTime(), and printData().

uint8_t roc::Message::getAuxFalling (  )  const [inline]

For Aux data: Returns falling edge flag (1 bit flag).

Definition at line 267 of file Message.h.

References getBit().

Referenced by cmd_testrocaux(), convertToOld(), TCosyDec10Proc::ExtractTriggerTimes(), roc::CombinerModule::FindNextEvent(), and printData().

uint8_t roc::Message::getAuxOverflow (  )  const [inline]

For Aux data: Returns overflow flag (1 bit field).

Definition at line 270 of file Message.h.

References getBit().

Referenced by convertToOld(), nxyter::QuickDaqStats::increment(), and printData().

uint16_t roc::Message::getAuxTs (  )  const [inline]

For Aux data: Returns aux time stamp (13 bit field, 2 ns bins).

Definition at line 261 of file Message.h.

References getField().

Referenced by roc::Sorter::addData(), cmd_testrocaux(), convertToOld(), getMsgFullTime(), and printData().

uint8_t roc::Message::getBit ( uint32_t  shift  )  const [inline]
uint32_t roc::Message::getEpoch2ChipNumber (  )  const [inline]

the epoche message (8 bit field)

For Epoch2 data: Returns the number of the GET4 chip that send

Definition at line 316 of file Message.h.

References getField().

Referenced by roc::CombinerModule::FindNextEvent(), roc::Iterator::next(), printData(), and TRocProc::ProcessGet4EpochMessage().

uint32_t roc::Message::getEpoch2CRC (  )  const [inline]

(not yet implemented in HW) (8 bit field)

For Epoch2 data: Returns the CRC-8 of the rest of the message

Definition at line 320 of file Message.h.

References getField().

uint32_t roc::Message::getEpoch2DataLost (  )  const [inline]

For Epoch2 data: Returns data-lost flag (1 bit field).

Definition at line 298 of file Message.h.

References getBit().

Referenced by printData(), and TRocProc::ProcessGet4EpochMessage().

uint32_t roc::Message::getEpoch2EpochLost (  )  const [inline]

For Epoch2 data: Returns epoch-lost flag (1 bit field).

Definition at line 295 of file Message.h.

References getBit().

Referenced by printData().

uint32_t roc::Message::getEpoch2EpochMissmatch (  )  const [inline]

ROC timestamp and timestamp send by GET4 did not match) (1 bit field).

For Epoch2 data: Returns epoch missmatch flag (set in ROC when

Definition at line 292 of file Message.h.

References getBit().

Referenced by printData().

uint32_t roc::Message::getEpoch2Number (  )  const [inline]

For Epoch2 data: Returns the epoch number (28 bit field).

Definition at line 312 of file Message.h.

References data.

Referenced by roc::CombinerModule::FindNextEvent(), roc::Iterator::getMsgEpoch(), getMsgFullTime(), getMsgFullTimeD(), roc::Iterator::next(), printData(), and TRocProc::ProcessGet4EpochMessage().

uint32_t roc::Message::getEpoch2StampTime (  )  const [inline]

For Epoch2 data: Returns the LTS156 bits 11 to 8. This gives information at what time in the Epoche the epoche number was set (4 bit field)

Definition at line 306 of file Message.h.

References getField().

Referenced by printData().

uint32_t roc::Message::getEpoch2Sync (  )  const [inline]

For Epoch2 data: Returns sync flag (1 bit field).

Definition at line 301 of file Message.h.

References getBit().

Referenced by roc::CombinerModule::FindNextEvent(), printData(), and TRocProc::ProcessGet4EpochMessage().

uint8_t roc::Message::getEpochMissed (  )  const [inline]

For Epoch data: Returns number of missed hits (8 bit field).

Definition at line 212 of file Message.h.

References getField().

Referenced by convertToOld(), roc::Sorter::flushBuffer(), nxyter::QuickDaqStats::increment(), and printData().

uint32_t roc::Message::getEpochNumber (  )  const [inline]
uint32_t roc::Message::getField ( uint32_t  shift,
uint32_t  len 
) const [inline]
uint8_t roc::Message::getGet4ChNum (  )  const [inline]
uint32_t roc::Message::getGet4CRC (  )  const [inline]

For details check the ROC documentation. (8 bit field).

For Get4 data: Returns the CRC-8 of the rest of the message.

Definition at line 366 of file Message.h.

References getField().

Referenced by printData().

uint32_t roc::Message::getGet4Edge (  )  const [inline]
uint8_t roc::Message::getGet4Number (  )  const [inline]
uint32_t roc::Message::getGet4Ts (  )  const [inline]
uint8_t roc::Message::getMessageType (  )  const [inline]
uint64_t roc::Message::getMsgFullTime ( uint32_t  epoch  )  const
double roc::Message::getMsgFullTimeD ( uint32_t  epoch  )  const

Returns expanded and adjusted time of message in double (in ns) epoch should correspond to the message type - epoch2 for Get4, epoch for all others

Definition at line 158 of file Message.cxx.

References FullTimeStamp2(), getEpoch2Number(), getGet4Ts(), getMessageType(), getMsgFullTime(), roc::MSG_EPOCH2, and roc::MSG_GET4.

Referenced by sp605::Iterator::getMsgFullTimeD(), roc::Iterator::getMsgFullTimeD(), TGet4v1MessageExtended::Print32Bit(), printData(), and TGet4v1Proc::ProcessSubevent().

uint16_t roc::Message::getNxAdcValue (  )  const [inline]
uint8_t roc::Message::getNxChNum (  )  const [inline]
uint8_t roc::Message::getNxLastEpoch (  )  const [inline]

For Hit data: Returns nXYTER last-epoch flag (1 bit field).

This flag is set when the hit actually belong to the previous epoch. Use the getMsgFullTime(uint32_t) const method to determine the expanded and adjusted timestamp.

Definition at line 172 of file Message.h.

References getBit().

Referenced by roc::Sorter::addData(), convertToOld(), getMsgFullTime(), and printData().

uint8_t roc::Message::getNxLtsMsb (  )  const [inline]

For Hit data: Returns 3 most significant bits of ROC LTS (3 bit field).

The 3 MSBs of the ROC local time stamp counter at the time of data capture are stored in this field. A comparison of this number, which reflects the time of readout, and the 3 MSBs of the timestamp (returned by getNxLtsMsb() const), which reflects the time of the hit, allows to estimate the time the hit stayed in the nXYTER internal FIFOs. This in turn gives an indication of the data load in the nXYTER.

Definition at line 128 of file Message.h.

References getField().

Referenced by convertToOld(), and printData().

uint8_t roc::Message::getNxNumber (  )  const [inline]

For Hit data: Returns nXYTER number (2 bit field).

A ROC can support up to 2 FEBs with a total of 4 nXYTER chips. This field identifies FEB as well as chip. Each supported configuration (either 2 x FEB1nx/FEB2nx or a single FEB4nx) as a unique nXYTER chip numbering.

Definition at line 116 of file Message.h.

References getField().

Referenced by acquire_data(), nxyter::FebUtil::acquireTestTriggerData(), TRocProc::BuildEvent(), roc::Sorter::checkLastEpoch(), cmd_autosettrh(), cmd_printdata(), convertToOld(), TPedestalExtractor::ExtractAutocalibrStream(), TPedestalExtractor::ExtractExttrigStream(), TRocMessageExtended::GetNxNumber(), nxyter::QuickDaqStats::increment(), printData(), TCosyDec10Proc::ProcessNxHit(), and TCernNov10Proc::ProcessRocMsg().

uint8_t roc::Message::getNxOverflow (  )  const [inline]

For Hit data: Returns nXYTER overflow flag (1 bit field).

This flag is set when a nXYTER channels detects a hit but this hit can't be stored because the 4 stage channel FIFO is full. This flag indicates that the hit data rate was higher than the chip can handle over a longer time.

See also:
getNxPileup() const

Definition at line 164 of file Message.h.

References getBit().

Referenced by convertToOld(), nxyter::QuickDaqStats::increment(), and printData().

uint8_t roc::Message::getNxPileup (  )  const [inline]

For Hit data: Returns nXYTER pileup flag (1 bit field).

This flag is set when the nXYTER trigger circuit detected two hits during the peak sense time interval of the slow amplitude channel. This flag indicates that separation between two hits was smaller than what can be handled by the amplitude channel.

See also:
getNxOverflow() const

Definition at line 155 of file Message.h.

References getBit().

Referenced by convertToOld(), nxyter::QuickDaqStats::increment(), and printData().

uint16_t roc::Message::getNxTs (  )  const [inline]

For Hit data: Returns nXYTER time stamp (14 bit field).

Raw timestamp as delivered by the nXYTER. The last-epoch flag (returned by getNxLastEpoch() const) determines whether the hit belongs to the current or the last epoch. Use the getMsgFullTime(uint32_t) const method to determine the expanded and adjusted timestamp.inline uint32_t getSysMesData() const { return getField(16, 32); }

Definition at line 138 of file Message.h.

References getField().

Referenced by roc::Sorter::addData(), roc::Sorter::checkLastEpoch(), convertToOld(), getMsgFullTime(), and printData().

uint16_t roc::Message::getRocNumber (  )  const [inline]
uint8_t roc::Message::getSyncChNum (  )  const [inline]
uint32_t roc::Message::getSyncData (  )  const [inline]

For Sync data: Returns sync message data (24 bit field).

Definition at line 233 of file Message.h.

References getField().

Referenced by TRocProc::BuildEvent(), cmd_testrocsync(), convertToOld(), roc::CombinerModule::FindNextEvent(), printData(), TSpadicV10Proc::ProcessSubevent(), and TGet4v1Proc::ProcessSubevent().

uint8_t roc::Message::getSyncEpochLSB (  )  const [inline]

For Sync data: Returns LSB of true epoch (1 bit field).

Definition at line 230 of file Message.h.

References getBit().

Referenced by roc::Sorter::addData(), convertToOld(), getMsgFullTime(), printData(), and TGet4v1Proc::ProcessSubevent().

uint8_t roc::Message::getSyncStFlag (  )  const [inline]

For Sync data: Returns sync status flags (2 bit field).

Definition at line 236 of file Message.h.

References getField().

Referenced by convertToOld(), printData(), and TGet4v1Proc::ProcessSubevent().

uint16_t roc::Message::getSyncTs (  )  const [inline]

For Sync data: Returns sync time stamp (13 bit field, 2 ns bins).

Definition at line 227 of file Message.h.

References getField().

Referenced by roc::Sorter::addData(), cmd_testrocsync(), convertToOld(), roc::CombinerModule::FindNextEvent(), getMsgFullTime(), printData(), and TGet4v1Proc::ProcessSubevent().

uint32_t roc::Message::getSysMesData (  )  const [inline]
uint8_t roc::Message::getSysMesType (  )  const [inline]
bool roc::Message::isAuxMsg (  )  const [inline]

Returns true is message type is MSG_AUX.

Definition at line 415 of file Message.h.

References getMessageType().

Referenced by cmd_testrocaux(), TCosyDec10Proc::ExtractTriggerTimes(), and roc::Sorter::flushBuffer().

bool roc::Message::isEpoch2Msg (  )  const [inline]

Returns true is message type is MSG_EPOCH2 (epoch2 marker).

Definition at line 417 of file Message.h.

References getMessageType().

bool roc::Message::isEpochMsg (  )  const [inline]

Returns true is message type is MSG_EPOCH (epoch marker).

Definition at line 411 of file Message.h.

References getMessageType().

Referenced by TRocProc::BuildEvent(), TCosyDec10Proc::ExtractTriggerTimes(), roc::FileInput::getNextBuffer(), sp605::Iterator::next(), and TGet4v1Proc::ProcessSubevent().

bool roc::Message::isGet4Msg (  )  const [inline]

Returns true is message type is MSG_GET4 (Get4 hit data).

Definition at line 419 of file Message.h.

References getMessageType().

bool roc::Message::isHitMsg (  )  const [inline]
bool roc::Message::isNopMsg (  )  const [inline]

Returns true is message type is MSG_NOP (filler message).

Definition at line 407 of file Message.h.

References getMessageType().

Referenced by roc::UdpDataSocket::CompressBuffer().

bool roc::Message::isStartDaqMsg (  )  const [inline]

Returns true if system message and subtype ROC_SYSMSG_DAQ_START.

Definition at line 424 of file Message.h.

References getSysMesType(), and isSysMsg().

Referenced by nxyter::QuickDaq::testRun().

bool roc::Message::isStopDaqMsg (  )  const [inline]

Returns true if system message and subtype ROC_SYSMSG_DAQ_FINISH.

Definition at line 427 of file Message.h.

References getSysMesType(), and isSysMsg().

Referenced by roc::Sorter::addData(), roc::UdpDataSocket::AddDataPacket(), and nxyter::QuickDaq::testRun().

bool roc::Message::isSyncMsg (  )  const [inline]
bool roc::Message::isSysMsg (  )  const [inline]

Returns true is message type is MSG_SYS (system message).

Definition at line 421 of file Message.h.

References getMessageType().

Referenced by cmd_testrocsync(), isStartDaqMsg(), isStopDaqMsg(), and TCosyDec10Proc::ProcessRocMsg().

Message& roc::Message::operator= ( const Message src  )  [inline]

Definition at line 71 of file Message.h.

References assign().

void roc::Message::printData ( 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 213 of file Message.cxx.

Referenced by TRPCProc::BuildHits(), cmd_printdata(), roc::CombinerModule::DumpData(), DataWidget::getData(), TRocMessageExtended::Print(), TGet4v1MessageExtended::Print(), sp605::Iterator::printMessage(), roc::Iterator::printMessage(), and roc::Iterator::printMessages().

void roc::Message::printData ( std::ostream &  os,
unsigned  kind = msg_print_Human,
uint32_t  epoch = 0 
) const

Print message in binary or human readable format to a stream.

Prints a one line representation of the message in to stream os. 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:
os output stream
kind mask determing output format
epoch current epoch number (from last epoch message)

Typical message output in human format looks like

Msg:7 Roc:1 SysType: 1 Nx:0 Data:        0 : DAQ started
Msg:7 Roc:1 SysType: 6 Nx:0 Data:        0 : FIFO reset
Msg:2 Roc:1 EPO @    0.536870912 Epo:     32768 0x00008000 Miss:   0
Msg:0 Roc:0 NOP (raw 80:40:82:0F:00:00)
Msg:2 Roc:1 EPO @    0.646627328 Epo:     39467 0x00009a2b Miss:   0
Msg:1 Roc:1 HIT @    0.646614333 Nx:2 Chn: 12 Ts: 3389-e( 8) Adc:2726 Pu:0 Of:0
Msg:1 Roc:1 HIT @    0.646630717 Nx:2 Chn: 13 Ts: 3389  ( 0) Adc:2745 Pu:0 Of:0
Msg:2 Roc:1 EPO @    0.805306368 Epo:     49152 0x0000c000 Miss:   0
Msg:3 Roc:1 SYN @    0.805306408 Chn:2 Ts:   40   Data:   49152 0x00c000 Flag:0
Msg:7 Roc:1 SysType: 2 Nx:0 Data:        0 : DAQ finished

Typical message output in binary format looks like

Msg:7 Roc:1 SysType: 1 Nx:0 Data:        0 : DAQ started
Msg:7 Roc:1 SysType: 6 Nx:0 Data:        0 : FIFO reset
Msg:2 Roc:1 Epoch:00008000 Missed:00
Msg:1 Roc:1 Nx:2 Chn:0d Ts:3ec9 Last:1 Msb:7 Adc:a22 Pup:0 Oflw:0
Msg:1 Roc:1 Nx:2 Chn:0e Ts:3ec9 Last:0 Msb:7 Adc:a18 Pup:0 Oflw:0
Msg:0 Roc:0 NOP (raw 80:40:82:0F:00:00)
Msg:2 Roc:1 Epoch:00010000 Missed:00
Msg:3 Roc:1 SyncChn:2 EpochLSB:0 Ts:0028 Data:010000 Flag:0
Msg:7 Roc:1 SysType: 2 Nx:0 Data:        0 : DAQ finished

Definition at line 269 of file Message.cxx.

References data, getAuxChNum(), getAuxEpochLSB(), getAuxFalling(), getAuxOverflow(), getAuxTs(), getBit(), getEpoch2ChipNumber(), getEpoch2DataLost(), getEpoch2EpochLost(), getEpoch2EpochMissmatch(), getEpoch2Number(), getEpoch2StampTime(), getEpoch2Sync(), getEpochMissed(), getEpochNumber(), getField(), getGet4ChNum(), getGet4CRC(), getGet4Edge(), getGet4Number(), getGet4Ts(), getMessageType(), getMsgFullTimeD(), getNxAdcValue(), getNxChNum(), getNxLastEpoch(), getNxLtsMsb(), getNxNumber(), getNxOverflow(), getNxPileup(), getNxTs(), getRocNumber(), getSyncChNum(), getSyncData(), getSyncEpochLSB(), getSyncStFlag(), getSyncTs(), getSysMesData(), getSysMesType(), roc::MSG_AUX, roc::MSG_EPOCH, roc::MSG_EPOCH2, roc::MSG_GET4, roc::MSG_HIT, roc::MSG_NOP, roc::msg_print_Data, roc::msg_print_Hex, roc::msg_print_Human, roc::msg_print_Prefix, roc::MSG_SYNC, roc::MSG_SYS, roc::SYSMSG_CLOSYSYNC_ERROR, roc::SYSMSG_DAQ_FINISH, roc::SYSMSG_DAQ_RESUME, roc::SYSMSG_DAQ_START, roc::SYSMSG_FIFO_RESET, roc::SYSMSG_GET4_EVENT, roc::SYSMSG_NX_PARITY, roc::SYSMSG_PACKETLOST, roc::SYSMSG_SYNC_PARITY, roc::SYSMSG_TS156_SYNC, roc::SYSMSG_USER, roc::SYSMSG_USER_CALIBR_OFF, roc::SYSMSG_USER_CALIBR_ON, and roc::SYSMSG_USER_RECONFIGURE.

uint32_t roc::Message::RawSize ( int  fmt  )  [static]
void roc::Message::reset (  )  [inline]
void roc::Message::setAuxChNum ( uint8_t  v  )  [inline]

For Aux data: Set aux channel number (7 bit field).

Definition at line 274 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setAuxEpochLSB ( uint8_t  v  )  [inline]

For Aux data: Set LSB of true epoch (1 bit field).

Definition at line 280 of file Message.h.

References setBit().

Referenced by convertFromOld(), UdpSimulator::fillRareSyncData(), and roc::Sorter::flushBuffer().

void roc::Message::setAuxFalling ( uint8_t  v  )  [inline]

For Aux data: Set falling edge flag (1 bit flag).

Definition at line 283 of file Message.h.

References setBit().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setAuxOverflow ( uint8_t  v  )  [inline]

For Aux data: Set overflow flag (1 bit field).

Definition at line 286 of file Message.h.

References setBit().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setAuxTs ( uint16_t  v  )  [inline]

For Aux data: Set aux time stamp (13 bit field).

Definition at line 277 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setBit ( uint32_t  shift,
uint8_t  value 
) [inline]
void roc::Message::setEpoch2ChipNumber ( uint32_t  v  )  [inline]

the epoche message (8 bit field)

For Epoch2 data: Set the number of the GET4 chip that send

Definition at line 344 of file Message.h.

References setField().

Referenced by TRocProc::ProcessGet4EpochMessage(), and TGet4v1MessageExtended::SetEpoch2ChipNumber().

void roc::Message::setEpoch2CRC ( uint32_t  v  )  [inline]

(not yet implemented in HW) (8 bit field)

For Epoch2 data: Set the CRC-8 of the rest of the message

Definition at line 348 of file Message.h.

References setField().

void roc::Message::setEpoch2DataLost ( uint32_t  v  )  [inline]

For Epoch2 data: Set data-lost flag (1 bit field).

Definition at line 329 of file Message.h.

References setBit().

void roc::Message::setEpoch2EpochLost ( uint32_t  v  )  [inline]

For Epoch2 data: Set epoch-lost flag (1 bit field).

Definition at line 326 of file Message.h.

References setBit().

void roc::Message::setEpoch2EpochMissmatch ( uint32_t  v  )  [inline]

For Epoch2 data: Set epoch missmatch flag (1 bit field).

Definition at line 323 of file Message.h.

References setBit().

void roc::Message::setEpoch2Number ( uint32_t  v  )  [inline]

For Epoch2 data: Set the epoch number (20 bit field).

Definition at line 340 of file Message.h.

References setField().

void roc::Message::setEpoch2StampTime ( uint32_t  v  )  [inline]

For Epoch2 data: Set the LTS156 bits 11 to 8. This gives information at what time in the Epoche the epoche number was set (4 bit field)

Definition at line 337 of file Message.h.

References setField().

void roc::Message::setEpoch2Sync ( uint32_t  v  )  [inline]

For Epoch2 data: Set sync flag (1 bit field).

Definition at line 332 of file Message.h.

References setBit().

void roc::Message::setEpochMissed ( uint8_t  v  )  [inline]

For Epoch data: Sets missed hits count (8 bit field).

Definition at line 218 of file Message.h.

References setField().

Referenced by convertFromOld(), roc::CombinerModule::FillRawSubeventsBuffer(), and roc::Sorter::flushBuffer().

void roc::Message::setEpochNumber ( uint32_t  v  )  [inline]

For Epoch data: Sets epoch number (32 bit field).

Definition at line 215 of file Message.h.

References setField().

Referenced by convertFromOld(), UdpSimulator::fillRareSyncData(), roc::CombinerModule::FillRawSubeventsBuffer(), and roc::Sorter::flushBuffer().

void roc::Message::setField ( uint32_t  shift,
uint32_t  len,
uint32_t  value 
) [inline]
void roc::Message::setGet4ChNum ( uint8_t  v  )  [inline]

For Get4 data: Sets Get4 channel number (2 bit field).

Definition at line 373 of file Message.h.

References setField().

void roc::Message::setGet4CRC ( uint32_t  v  )  [inline]

For details check the ROC documentation. (8 bit field).

For Get4 data: Set the CRC-8 of the rest of the message

Definition at line 383 of file Message.h.

References setField().

void roc::Message::setGet4Edge ( uint32_t  v  )  [inline]

For Get4 data: Sets Get4 rising or falling edge (1 bit field).

Definition at line 379 of file Message.h.

References setBit().

Referenced by TRocProc::ProcessGet4DataMessage().

void roc::Message::setGet4Number ( uint8_t  v  )  [inline]

For Get4 data: Sets Get4 chip number (6 bit field).

Definition at line 370 of file Message.h.

References setField().

Referenced by TRocProc::ProcessGet4DataMessage(), TRocProc::ProcessGet4ExtSyncMessage(), and TGet4v1MessageExtended::SetGet4Number().

void roc::Message::setGet4Ts ( uint32_t  v  )  [inline]

For Get4 data: Sets Get4 time stamp, 50 ps binning (19 bit field).

Definition at line 376 of file Message.h.

References setField().

void roc::Message::setMessageType ( uint8_t  v  )  [inline]
void roc::Message::setNxAdcValue ( uint16_t  v  )  [inline]

For Hit data: Sets ADC value (12 bit field).

Definition at line 190 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setNxChNum ( uint8_t  v  )  [inline]

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

Definition at line 185 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setNxLastEpoch ( uint8_t  v  )  [inline]

For Hit data: Sets nXYTER last-epoch flag (1 bit field).

Definition at line 199 of file Message.h.

References setBit().

Referenced by convertFromOld(), UdpSimulator::fillRareSyncData(), and roc::Sorter::flushBuffer().

void roc::Message::setNxLtsMsb ( uint8_t  v  )  [inline]

For Hit data: Sets 3 most significant bits of ROC LTS (3 bit field).

Definition at line 179 of file Message.h.

References setField().

Referenced by convertFromOld().

void roc::Message::setNxNumber ( uint8_t  v  )  [inline]

For Hit data: Sets nXYTER number (2 bit field).

Definition at line 176 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setNxOverflow ( uint8_t  v  )  [inline]

For Hit data: Sets nXYTER overflow flag (1 bit field).

Definition at line 196 of file Message.h.

References setBit().

Referenced by convertFromOld().

void roc::Message::setNxPileup ( uint8_t  v  )  [inline]

For Hit data: Sets nXYTER pileup flag (1 bit field).

Definition at line 193 of file Message.h.

References setBit().

Referenced by convertFromOld().

void roc::Message::setNxTs ( uint16_t  v  )  [inline]

For Hit data: Sets nXYTER time stamp (14 bit field).

Definition at line 182 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setRocNumber ( uint16_t  v  )  [inline]
void roc::Message::setSyncChNum ( uint8_t  v  )  [inline]

For Sync data: Set sync channel number (2 bit field).

Definition at line 240 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setSyncData ( uint32_t  v  )  [inline]

For Sync data: Set sync message data (24 bit field).

Definition at line 249 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setSyncEpochLSB ( uint8_t  v  )  [inline]

For Sync data: Set LSB of true epoch (1 bit field).

Definition at line 246 of file Message.h.

References setBit().

Referenced by convertFromOld(), UdpSimulator::fillRareSyncData(), and roc::Sorter::flushBuffer().

void roc::Message::setSyncStFlag ( uint8_t  v  )  [inline]

For Sync data: Set sync status flags (2 bit field).

Definition at line 252 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setSyncTs ( uint16_t  v  )  [inline]

For Sync data: Set sync time stamp (13 bit field, 2 ns bins ).

Definition at line 243 of file Message.h.

References setField().

Referenced by convertFromOld(), and UdpSimulator::fillRareSyncData().

void roc::Message::setSysMesData ( uint32_t  v  )  [inline]

For SysMes data: Set system message data (32 bit field).

Definition at line 401 of file Message.h.

References setField().

Referenced by convertFromOld(), UdpSimulator::makeSysMessage(), roc::BoardsVector::readFeb(), and roc::BoardsVector::readoutExtraMessages().

void roc::Message::setSysMesType ( uint8_t  v  )  [inline]

For SysMes data: Set system message type (8 bit field).

Definition at line 398 of file Message.h.

References setField().

Referenced by roc::UdpDataSocket::CheckNextRequest(), convertFromOld(), UdpSimulator::makeSysMessage(), roc::BoardsVector::readFeb(), and roc::BoardsVector::readoutExtraMessages().


Field Documentation

uint64_t roc::Message::data [protected]

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