#include <Iterator.h>
Public Member Functions | |
Iterator (int fmt=formatNormal) | |
Iterator (base::Board *brd, bool owner=false) | |
Iterator (const Iterator &src) | |
Iterator (const char *filename) | |
virtual | ~Iterator () |
void | setFormat (int fmt) |
int | getFormat () const |
bool | isFile () const |
void | setRocNumber (uint16_t rocnum=0) |
uint32_t | getMsgSize () const |
bool | assign (void *buf, uint32_t len) |
bool | nextBuffer (base::Board *brd, double tmout=1.) |
void | resetEpochs () |
bool | next (double tmout=1.) |
bool | islast () const |
bool | last () |
bool | prev () |
uint32_t | getLastEpoch () const |
uint32_t | getLastEpoch2 (unsigned n=0) const |
Message & | msg () |
uint32_t | getMsgEpoch () const |
uint64_t | getMsgFullTime () const |
double | getMsgFullTimeD () const |
void | printMessage (unsigned kind=msg_print_Prefix|msg_print_Data) |
void | printMessages (unsigned cnt=100, unsigned kind=msg_print_Prefix|msg_print_Data) |
Protected Types | |
enum | { MaxGet4 = 16 } |
Protected Attributes | |
int | fFormat |
void * | fBuffer |
uint32_t | fBufferLen |
uint32_t | fBufferPos |
uint32_t | fMsgSize |
Message | fMsg |
uint32_t | fEpoch |
uint32_t | fEpoch2 [MaxGet4] |
base::Board * | fBoard |
bool | fOwner |
Definition at line 10 of file Iterator.h.
anonymous enum [protected] |
Definition at line 12 of file Iterator.h.
roc::Iterator::Iterator | ( | int | fmt = formatNormal |
) |
Definition at line 3 of file Iterator.cxx.
References fEpoch2, fFormat, fMsgSize, and roc::Message::RawSize().
roc::Iterator::Iterator | ( | base::Board * | brd, | |
bool | owner = false | |||
) |
Definition at line 33 of file Iterator.cxx.
References base::Board::boardNumber(), fEpoch2, fFormat, fMsgSize, roc::Message::RawSize(), and setRocNumber().
roc::Iterator::Iterator | ( | const Iterator & | src | ) |
Definition at line 18 of file Iterator.cxx.
References fEpoch2.
roc::Iterator::Iterator | ( | const char * | filename | ) |
Definition at line 49 of file Iterator.cxx.
References roc::Board::Connect(), fBoard, fEpoch2, fFormat, fMsgSize, fOwner, base::Board::getMsgFormat(), roc::Message::RawSize(), roc::Board::rocNumber(), setRocNumber(), and base::Board::startDaq().
roc::Iterator::~Iterator | ( | ) | [virtual] |
Definition at line 73 of file Iterator.cxx.
References base::Board::Close(), fBoard, and fOwner.
bool roc::Iterator::assign | ( | void * | buf, | |
uint32_t | len | |||
) |
Definition at line 109 of file Iterator.cxx.
References fBuffer, fBufferLen, fBufferPos, and fMsgSize.
Referenced by roc::Sorter::addData(), roc::UdpDataSocket::AddDataPacket(), TRocProc::BuildEvent(), roc::UdpDataSocket::CompressBuffer(), roc::Sorter::flushBuffer(), roc::FileInput::getNextBuffer(), InitIterator(), and nextBuffer().
int roc::Iterator::getFormat | ( | ) | const [inline] |
Definition at line 37 of file Iterator.h.
References fFormat.
Referenced by roc::FileInput::getNextBuffer().
uint32_t roc::Iterator::getLastEpoch | ( | ) | const [inline] |
Definition at line 92 of file Iterator.h.
References fEpoch.
uint32_t roc::Iterator::getLastEpoch2 | ( | unsigned | n = 0 |
) | const [inline] |
Definition at line 94 of file Iterator.h.
uint32_t roc::Iterator::getMsgEpoch | ( | ) | const [inline] |
Definition at line 98 of file Iterator.h.
References fEpoch, fEpoch2, fMsg, roc::Message::getEpoch2Number(), roc::Message::getGet4Number(), roc::Message::getMessageType(), roc::MSG_EPOCH2, and roc::MSG_GET4.
Referenced by nxyter::QuickDaq::getMsgEpoch(), getMsgFullTime(), getMsgFullTimeD(), printMessage(), and printMessages().
uint64_t roc::Iterator::getMsgFullTime | ( | ) | const [inline] |
Definition at line 110 of file Iterator.h.
References fMsg, getMsgEpoch(), and roc::Message::getMsgFullTime().
double roc::Iterator::getMsgFullTimeD | ( | ) | const [inline] |
Definition at line 115 of file Iterator.h.
References fMsg, getMsgEpoch(), and roc::Message::getMsgFullTimeD().
Referenced by nxyter::QuickDaq::testRun().
uint32_t roc::Iterator::getMsgSize | ( | ) | const [inline] |
Definition at line 43 of file Iterator.h.
References fMsgSize.
Referenced by roc::CombinerModule::FindNextEvent().
bool roc::Iterator::isFile | ( | ) | const |
Definition at line 82 of file Iterator.cxx.
References fBoard, and base::Board::isFile().
bool roc::Iterator::islast | ( | ) | const [inline] |
Definition at line 70 of file Iterator.h.
References fBufferLen, and fBufferPos.
bool roc::Iterator::last | ( | ) | [inline] |
Definition at line 73 of file Iterator.h.
References fBuffer, fBufferLen, fBufferPos, fMsgSize, and next().
Referenced by roc::FileInput::getNextBuffer().
Message& roc::Iterator::msg | ( | ) | [inline] |
Definition at line 96 of file Iterator.h.
References fMsg.
Referenced by roc::Sorter::addData(), roc::UdpDataSocket::AddDataPacket(), TRocProc::BuildEvent(), roc::Sorter::checkLastEpoch(), roc::UdpDataSocket::CompressBuffer(), roc::CombinerModule::DumpData(), roc::CombinerModule::FindNextEvent(), roc::Sorter::flushBuffer(), roc::FileInput::getNextBuffer(), nxyter::QuickDaq::msg(), printMessage(), printMessages(), and nxyter::QuickDaq::testRun().
bool roc::Iterator::next | ( | double | tmout = 1. |
) | [inline] |
Definition at line 51 of file Iterator.h.
References roc::Message::assign(), fBoard, fBuffer, fBufferLen, fBufferPos, fEpoch, fEpoch2, fFormat, fMsg, fMsgSize, roc::Message::getEpoch2ChipNumber(), roc::Message::getEpoch2Number(), roc::Message::getEpochNumber(), roc::Message::getMessageType(), roc::MSG_EPOCH, roc::MSG_EPOCH2, and nextBuffer().
Referenced by roc::Sorter::addData(), roc::UdpDataSocket::AddDataPacket(), TRocProc::BuildEvent(), roc::UdpDataSocket::CompressBuffer(), roc::CombinerModule::DumpData(), roc::CombinerModule::FindNextEvent(), roc::Sorter::flushBuffer(), last(), prev(), printMessages(), nxyter::QuickDaq::stopRun(), and nxyter::QuickDaq::testRun().
bool roc::Iterator::nextBuffer | ( | base::Board * | brd, | |
double | tmout = 1. | |||
) |
Definition at line 118 of file Iterator.cxx.
References assign(), base::Board::boardNumber(), fFormat, fMsgSize, base::Board::getMsgFormat(), base::Board::getNextBuffer(), roc::Message::RawSize(), and setRocNumber().
Referenced by next().
bool roc::Iterator::prev | ( | ) | [inline] |
Definition at line 83 of file Iterator.h.
References fBuffer, fBufferPos, fMsgSize, and next().
Referenced by roc::Sorter::checkLastEpoch(), and roc::FileInput::getNextBuffer().
void roc::Iterator::printMessage | ( | unsigned | kind = msg_print_Prefix | msg_print_Data |
) |
Definition at line 134 of file Iterator.cxx.
References getMsgEpoch(), msg(), and roc::Message::printData().
void roc::Iterator::printMessages | ( | unsigned | cnt = 100 , |
|
unsigned | kind = msg_print_Prefix | msg_print_Data | |||
) |
Definition at line 140 of file Iterator.cxx.
References getMsgEpoch(), msg(), next(), and roc::Message::printData().
void roc::Iterator::resetEpochs | ( | ) |
Definition at line 103 of file Iterator.cxx.
void roc::Iterator::setFormat | ( | int | fmt | ) |
Definition at line 90 of file Iterator.cxx.
References fFormat, fMsgSize, and roc::Message::RawSize().
Referenced by InitIterator().
void roc::Iterator::setRocNumber | ( | uint16_t | rocnum = 0 |
) |
Definition at line 97 of file Iterator.cxx.
References fFormat, fMsg, roc::formatEth2, and roc::Message::setRocNumber().
Referenced by TRocProc::BuildEvent(), InitIterator(), Iterator(), and nextBuffer().
base::Board* roc::Iterator::fBoard [protected] |
Definition at line 22 of file Iterator.h.
Referenced by isFile(), Iterator(), next(), and ~Iterator().
void* roc::Iterator::fBuffer [protected] |
uint32_t roc::Iterator::fBufferLen [protected] |
uint32_t roc::Iterator::fBufferPos [protected] |
uint32_t roc::Iterator::fEpoch [protected] |
Definition at line 20 of file Iterator.h.
Referenced by getLastEpoch(), getMsgEpoch(), next(), and resetEpochs().
uint32_t roc::Iterator::fEpoch2[MaxGet4] [protected] |
Definition at line 21 of file Iterator.h.
Referenced by getLastEpoch2(), getMsgEpoch(), Iterator(), next(), and resetEpochs().
int roc::Iterator::fFormat [protected] |
Definition at line 14 of file Iterator.h.
Referenced by getFormat(), Iterator(), next(), nextBuffer(), setFormat(), and setRocNumber().
Message roc::Iterator::fMsg [protected] |
Definition at line 19 of file Iterator.h.
Referenced by getMsgEpoch(), getMsgFullTime(), getMsgFullTimeD(), msg(), next(), and setRocNumber().
uint32_t roc::Iterator::fMsgSize [protected] |
Definition at line 18 of file Iterator.h.
Referenced by assign(), getMsgSize(), Iterator(), last(), next(), nextBuffer(), prev(), and setFormat().
bool roc::Iterator::fOwner [protected] |
Definition at line 23 of file Iterator.h.
Referenced by Iterator(), and ~Iterator().