#include <Message.h>
Public Member Functions | |
Message () | |
~Message () | |
void | clear () |
size_t | assign (void *buf, unsigned fullsz) |
uint8_t | getMsgType () const |
uint16_t | getSpadicNumber () const |
void | setSpadicNumber (uint16_t id) |
uint8_t | getGroup () const |
uint8_t | getChNum () const |
unsigned | getFullChNum () const |
uint8_t | getHitType () const |
uint8_t | getStopType () const |
uint8_t | getTraceSize () const |
uint16_t | getTimeStamp () const |
uint8_t | getOverflowHits () const |
uint8_t | getInfoType () const |
uint8_t | getInfoChannel () const |
uint8_t | getInfoEpoch () const |
uint8_t | evalGroup (uint16_t *pSOM) const |
uint8_t | evalChNum (uint16_t *pSOM) const |
uint8_t | evalHitType (uint16_t *pEOM) const |
uint8_t | evalStopType (uint16_t *pEOM) const |
size_t | evalTraceSize (uint16_t *pEOM) const |
int16_t | getTrace (unsigned bin) |
unsigned | getEpoch () const |
uint16_t | evalTimeStamp (uint16_t *fTSW) const |
uint32_t | getMsgFullTime (uint16_t epoch=0) const |
double | getMsgFullTimeD (uint16_t epoch=0) const |
void | printData () |
bool | isTrace () const |
bool | isEpoch () const |
bool | isNopMsg () const |
bool | isHitMsg () const |
bool | isEpochMsg () const |
bool | isOverflowMsg () const |
bool | isInfoMsg () const |
Static Public Member Functions | |
static uint32_t | FullTimeStamp (uint16_t epoch, uint16_t stamp) |
Expanded timestamp for 25 MHz and 12 bit epochs. | |
Protected Member Functions | |
void | InitTraceBuffer (uint16_t *fRDA) |
bool | SetTrace (unsigned bin, int16_t value, unsigned len) |
Protected Attributes | |
uint8_t | fMsgType |
uint16_t | fSpadicId |
uint8_t | fGroup |
uint8_t | fChan |
uint8_t | fHitType |
uint8_t | fInfoType |
uint16_t | fTimeStamp |
uint16_t | fEpoch |
uint8_t | fTraceSize |
std::vector< int16_t > | fTraces |
Definition at line 76 of file Message.h.
size_t sp605::Message::assign | ( | void * | buf, | |
unsigned | fullsz | |||
) |
Method to set pointer on raw buffer which contains message
buf | is raw buffer, | |
fullsz | is size of raw buffer - message can be shorter This method will also figure out message types and evaluates pointers to special words inside the message. Return value will indicate shift in buffer until end of current message Note that buf is never owned by the message, but only used as input |
Definition at line 23 of file Message.cxx.
References clear(), DPRINT605, evalChNum(), evalGroup(), evalHitType(), evalStopType(), evalTimeStamp(), evalTraceSize(), fChan, fEpoch, fGroup, fHitType, fInfoType, fMsgType, fTimeStamp, fTraceSize, sp605::INFO_DIS, sp605::INFO_MSB, sp605::INFO_NBE, sp605::INFO_NGT, sp605::INFO_NOP, sp605::INFO_NRT, sp605::INFO_SYN, and InitTraceBuffer().
Referenced by sp605::Iterator::next().
void sp605::Message::clear | ( | ) | [inline] |
uint8_t sp605::Message::evalChNum | ( | uint16_t * | pSOM | ) | const [inline] |
uint8_t sp605::Message::evalGroup | ( | uint16_t * | pSOM | ) | const [inline] |
uint8_t sp605::Message::evalHitType | ( | uint16_t * | pEOM | ) | const [inline] |
Definition at line 230 of file Message.h.
References getMsgType(), and sp605::MSG_HIT.
Referenced by assign().
uint8_t sp605::Message::evalStopType | ( | uint16_t * | pEOM | ) | const [inline] |
Definition at line 237 of file Message.h.
References getMsgType(), and sp605::MSG_HIT.
Referenced by assign().
uint16_t sp605::Message::evalTimeStamp | ( | uint16_t * | fTSW | ) | const [inline] |
size_t sp605::Message::evalTraceSize | ( | uint16_t * | pEOM | ) | const [inline] |
Definition at line 249 of file Message.h.
References getMsgType(), and sp605::MSG_HIT.
Referenced by assign().
static uint32_t sp605::Message::FullTimeStamp | ( | uint16_t | epoch, | |
uint16_t | stamp | |||
) | [inline, static] |
Expanded timestamp for 25 MHz and 12 bit epochs.
Definition at line 282 of file Message.h.
Referenced by getMsgFullTime().
uint8_t sp605::Message::getChNum | ( | ) | const [inline] |
Definition at line 152 of file Message.h.
References fChan.
Referenced by TSpadicV10MessageExtended::GetChNum(), getFullChNum(), printData(), and TSpadicV10Proc::ProcessSubevent().
unsigned sp605::Message::getEpoch | ( | ) | const [inline] |
Definition at line 267 of file Message.h.
References fEpoch.
Referenced by getMsgFullTime(), sp605::Iterator::next(), and TSpadicV10Proc::ProcessSubevent().
unsigned sp605::Message::getFullChNum | ( | ) | const [inline] |
Definition at line 158 of file Message.h.
References getChNum(), and getGroup().
Referenced by TSpadicV10MessageExtended::GetFullChNum().
uint8_t sp605::Message::getGroup | ( | ) | const [inline] |
Definition at line 146 of file Message.h.
References fGroup.
Referenced by getFullChNum(), TSpadicV10MessageExtended::GetGroupNumber(), sp605::Iterator::getMsgFullTime(), sp605::Iterator::getMsgFullTimeD(), sp605::Iterator::next(), printData(), and TSpadicV10Proc::ProcessSubevent().
uint8_t sp605::Message::getHitType | ( | ) | const [inline] |
Definition at line 165 of file Message.h.
References fHitType.
Referenced by TSpadicV10Proc::ProcessSubevent().
uint8_t sp605::Message::getInfoChannel | ( | ) | const [inline] |
uint8_t sp605::Message::getInfoEpoch | ( | ) | const [inline] |
Definition at line 206 of file Message.h.
References fEpoch.
Referenced by printData(), and TSpadicV10Proc::ProcessSubevent().
uint8_t sp605::Message::getInfoType | ( | ) | const [inline] |
Definition at line 196 of file Message.h.
References fInfoType.
Referenced by printData(), and TSpadicV10Proc::ProcessSubevent().
uint32_t sp605::Message::getMsgFullTime | ( | uint16_t | epoch = 0 |
) | const |
Definition at line 187 of file Message.cxx.
References FullTimeStamp(), getEpoch(), getMsgType(), getTimeStamp(), sp605::MSG_EPOCH, sp605::MSG_HIT, and sp605::MSG_OVERFLOW.
Referenced by sp605::Iterator::getMsgFullTime(), and getMsgFullTimeD().
double sp605::Message::getMsgFullTimeD | ( | uint16_t | epoch = 0 |
) | const |
Returns expanded and adjusted time of message in double (in ns) epoch should correspond to the message type
Definition at line 203 of file Message.cxx.
References getMsgFullTime().
Referenced by sp605::Iterator::getMsgFullTimeD().
uint8_t sp605::Message::getMsgType | ( | ) | const [inline] |
Definition at line 137 of file Message.h.
References fMsgType.
Referenced by evalHitType(), evalStopType(), evalTraceSize(), TSpadicV10MessageExtended::GetMessageType(), getMsgFullTime(), getTrace(), isEpochMsg(), isHitMsg(), isInfoMsg(), isNopMsg(), isOverflowMsg(), printData(), and TSpadicV10Proc::ProcessSubevent().
uint8_t sp605::Message::getOverflowHits | ( | ) | const [inline] |
Definition at line 190 of file Message.h.
References fEpoch.
Referenced by TSpadicV10Proc::ProcessSubevent().
uint16_t sp605::Message::getSpadicNumber | ( | ) | const [inline] |
Definition at line 140 of file Message.h.
References fSpadicId.
Referenced by sp605::Iterator::getMsgFullTime(), sp605::Iterator::getMsgFullTimeD(), TSpadicV10MessageExtended::GetSpadicNumber(), and sp605::Iterator::next().
uint8_t sp605::Message::getStopType | ( | ) | const [inline] |
Definition at line 170 of file Message.h.
References fInfoType.
Referenced by TSpadicV10Proc::ProcessSubevent().
uint16_t sp605::Message::getTimeStamp | ( | ) | const [inline] |
Definition at line 183 of file Message.h.
References fTimeStamp.
Referenced by getMsgFullTime(), and printData().
int16_t sp605::Message::getTrace | ( | unsigned | bin | ) | [inline] |
Definition at line 258 of file Message.h.
References fTraces, getMsgType(), getTraceSize(), and sp605::MSG_HIT.
Referenced by TSpadicV10Proc::ProcessSubevent().
uint8_t sp605::Message::getTraceSize | ( | ) | const [inline] |
Definition at line 178 of file Message.h.
References fTraceSize.
Referenced by getTrace(), InitTraceBuffer(), and TSpadicV10Proc::ProcessSubevent().
void sp605::Message::InitTraceBuffer | ( | uint16_t * | fRDA | ) | [protected] |
Definition at line 145 of file Message.cxx.
References fTraces, getTraceSize(), and SetTrace().
Referenced by assign().
bool sp605::Message::isEpoch | ( | ) | const [inline] |
Definition at line 291 of file Message.h.
References isEpochMsg().
Referenced by sp605::Iterator::next().
bool sp605::Message::isEpochMsg | ( | ) | const [inline] |
bool sp605::Message::isHitMsg | ( | ) | const [inline] |
bool sp605::Message::isInfoMsg | ( | ) | const [inline] |
Definition at line 297 of file Message.h.
References getMsgType().
bool sp605::Message::isNopMsg | ( | ) | const [inline] |
Definition at line 293 of file Message.h.
References getMsgType().
bool sp605::Message::isOverflowMsg | ( | ) | const [inline] |
Definition at line 296 of file Message.h.
References getMsgType().
bool sp605::Message::isTrace | ( | ) | const [inline] |
Definition at line 289 of file Message.h.
References isHitMsg().
void sp605::Message::printData | ( | ) |
Definition at line 209 of file Message.cxx.
References fTraces, getChNum(), getGroup(), getInfoChannel(), getInfoEpoch(), getInfoType(), getMsgType(), getTimeStamp(), sp605::INFO_DIS, sp605::INFO_MSB, sp605::INFO_NBE, sp605::INFO_NGT, sp605::INFO_NOP, sp605::INFO_NRT, sp605::INFO_SYN, sp605::MSG_INFO, sp605_info_descr, sp605_info_names, and sp605_msg_names.
Referenced by sp605::Iterator::printMessage().
void sp605::Message::setSpadicNumber | ( | uint16_t | id | ) | [inline] |
Definition at line 143 of file Message.h.
References fSpadicId.
Referenced by sp605::Iterator::next().
bool sp605::Message::SetTrace | ( | unsigned | bin, | |
int16_t | value, | |||
unsigned | len | |||
) | [inline, protected] |
uint8_t sp605::Message::fChan [protected] |
Definition at line 81 of file Message.h.
Referenced by assign(), clear(), getChNum(), and getInfoChannel().
uint16_t sp605::Message::fEpoch [protected] |
Definition at line 85 of file Message.h.
Referenced by assign(), clear(), getEpoch(), getInfoEpoch(), and getOverflowHits().
uint8_t sp605::Message::fGroup [protected] |
Definition at line 80 of file Message.h.
Referenced by assign(), clear(), and getGroup().
uint8_t sp605::Message::fHitType [protected] |
Definition at line 82 of file Message.h.
Referenced by assign(), clear(), and getHitType().
uint8_t sp605::Message::fInfoType [protected] |
Definition at line 83 of file Message.h.
Referenced by assign(), getInfoType(), and getStopType().
uint8_t sp605::Message::fMsgType [protected] |
Definition at line 78 of file Message.h.
Referenced by assign(), clear(), and getMsgType().
uint16_t sp605::Message::fSpadicId [protected] |
Definition at line 79 of file Message.h.
Referenced by clear(), getSpadicNumber(), and setSpadicNumber().
uint16_t sp605::Message::fTimeStamp [protected] |
Definition at line 84 of file Message.h.
Referenced by assign(), clear(), and getTimeStamp().
std::vector<int16_t> sp605::Message::fTraces [protected] |
Definition at line 87 of file Message.h.
Referenced by clear(), getTrace(), InitTraceBuffer(), printData(), and SetTrace().
uint8_t sp605::Message::fTraceSize [protected] |
Definition at line 86 of file Message.h.
Referenced by assign(), clear(), and getTraceSize().