#include <CombinerModule.h>
Data Structures | |
struct | InputRec |
Public Member Functions | |
CombinerModule (const char *name, dabc::Command cmd) | |
virtual | ~CombinerModule () |
virtual void | BeforeModuleStart () |
virtual void | ProcessInputEvent (dabc::Port *port) |
virtual void | ProcessOutputEvent (dabc::Port *port) |
virtual void | ProcessTimerEvent (dabc::Timer *timer) |
Protected Types | |
enum | { MaxGet4 = 16, MaxGet4Ch = 4 } |
Protected Member Functions | |
virtual int | ExecuteCommand (dabc::Command cmd) |
virtual void | PoolHandleCleaned (dabc::PoolHandle *pool) |
virtual void | ModuleCleanup () |
bool | FindNextEvent (unsigned recid) |
bool | SkipEvent (unsigned recid) |
void | FillBuffer () |
void | FillSimpleBuffer () |
bool | FlushOutputBuffer () |
void | InvokeAllGet4Reset () |
unsigned | FillRawSubeventsBuffer (dabc::Buffer &buf, dabc::Pointer &outptr, roc::MessagesVector *extra=0) |
void | AddExtraMessagesToSubevent (dabc::Buffer &buf, roc::MessagesVector *extra, dabc::Pointer &outptr, unsigned &subeventsize, InputRec *rec) |
void | DumpData (dabc::Buffer &buf) |
void | SetInfo (const std::string &info, bool forceinfo=false) |
Protected Attributes | |
dabc::PoolHandle * | fInpPool |
dabc::PoolHandle * | fOutPool |
dabc::BufferSize_t | fBufferSize |
bool | fSimpleMode |
bool | fBnetMode |
int | fSyncScaleDown |
int | fSyncNumber |
bool | fIgnoreMissingEpoch |
bool | fSkipErrorData |
std::vector< InputRec > | fInp |
dabc::Buffer | fOutBuf |
dabc::Pointer | f_outptr |
int | fSpillRoc |
int | fSpillAux |
bool | fSpillState |
uint64_t | fLastSpillTime |
double | fCalibrationPeriod |
double | fCalibrationLength |
dabc::TimeStamp | fLastCalibrationTime |
double | fGet4ResetPeriod |
int | fThrottleAux |
std::list< MessagesVector * > | fExtraMessages |
bool | fFlushFlag |
double | fGet4ResetLimit |
dabc::TimeStamp | fLastGet4ResetTm |
bool | fDetectGet4Problem |
Definition at line 45 of file CombinerModule.h.
anonymous enum [protected] |
Definition at line 62 of file CombinerModule.h.
roc::CombinerModule::CombinerModule | ( | const char * | name, | |
dabc::Command | cmd | |||
) |
Definition at line 74 of file CombinerModule.cxx.
References fBnetMode, fBufferSize, fCalibrationLength, fCalibrationPeriod, fDetectGet4Problem, fFlushFlag, fGet4ResetLimit, fGet4ResetPeriod, fIgnoreMissingEpoch, fInp, fInpPool, fLastCalibrationTime, fLastGet4ResetTm, fLastSpillTime, fOutPool, fSimpleMode, fSkipErrorData, fSpillAux, fSpillRoc, fSyncNumber, fSyncScaleDown, fThrottleAux, SetInfo(), roc::xmlBnetMode, roc::xmlCalibrationLength, roc::xmlCalibrationPeriod, roc::xmlGet4ResetLimit, roc::xmlGet4ResetPeriod, roc::xmlIgnoreMissingEpoch, roc::xmlRocPool, roc::xmlSkipErrorData, roc::xmlSpillAux, roc::xmlSpillRoc, roc::xmlSyncNumber, roc::xmlSyncScaleDown, and roc::xmlThrottleAux.
roc::CombinerModule::~CombinerModule | ( | ) | [virtual] |
Definition at line 199 of file CombinerModule.cxx.
void roc::CombinerModule::AddExtraMessagesToSubevent | ( | dabc::Buffer & | buf, | |
roc::MessagesVector * | extra, | |||
dabc::Pointer & | outptr, | |||
unsigned & | subeventsize, | |||
InputRec * | rec | |||
) | [protected] |
Definition at line 1225 of file CombinerModule.cxx.
References roc::CombinerModule::InputRec::format, roc::Message::RawSize(), and roc::CombinerModule::InputRec::rocid.
Referenced by FillRawSubeventsBuffer().
void roc::CombinerModule::BeforeModuleStart | ( | ) | [virtual] |
Definition at line 257 of file CombinerModule.cxx.
References fCalibrationPeriod, and fSpillAux.
void roc::CombinerModule::DumpData | ( | dabc::Buffer & | buf | ) | [protected] |
Definition at line 1242 of file CombinerModule.cxx.
References InitIterator(), roc::Iterator::msg(), roc::Iterator::next(), and roc::Message::printData().
int roc::CombinerModule::ExecuteCommand | ( | dabc::Command | cmd | ) | [protected, virtual] |
Definition at line 1251 of file CombinerModule.cxx.
References fExtraMessages, fInp, roc::CombinerModule::InputRec::format, roc::CombinerModule::InputRec::isrocid(), roc::CombinerModule::InputRec::isudp, roc::CombinerModule::InputRec::rocid, SetInfo(), and roc::CmdMessagesVector::Vector().
void roc::CombinerModule::FillBuffer | ( | ) | [protected] |
Definition at line 833 of file CombinerModule.cxx.
References CalcAbsEventDistanceNew(), CalcEventDistanceNew(), roc::CombinerModule::InputRec::data_err, roc::CombinerModule::InputRec::data_length, f_outptr, fBnetMode, fBufferSize, fExtraMessages, FillRawSubeventsBuffer(), fInp, FlushOutputBuffer(), roc::CombinerModule::InputRec::format, roc::formatNormal, fOutBuf, fOutPool, fSkipErrorData, fSyncScaleDown, roc::CombinerModule::InputRec::isprev, roc::CombinerModule::InputRec::isready, roc::CombinerModule::InputRec::next_evnt, roc::CombinerModule::InputRec::prev_evnt, roc::Message::RawSize(), roc::CombinerModule::InputRec::rocid, SetInfo(), SkipEvent(), and roc::CombinerModule::InputRec::use.
Referenced by ProcessInputEvent(), and ProcessOutputEvent().
unsigned roc::CombinerModule::FillRawSubeventsBuffer | ( | dabc::Buffer & | buf, | |
dabc::Pointer & | outptr, | |||
roc::MessagesVector * | extra = 0 | |||
) | [protected] |
Definition at line 1143 of file CombinerModule.cxx.
References AddExtraMessagesToSubevent(), roc::Message::copyto(), roc::CombinerModule::InputRec::data_err, fInp, roc::CombinerModule::InputRec::format, roc::MSG_EPOCH, roc::CombinerModule::InputRec::next_indx, roc::CombinerModule::InputRec::next_nbuf, roc::CombinerModule::InputRec::prev_epoch, roc::CombinerModule::InputRec::prev_indx, roc::CombinerModule::InputRec::prev_nbuf, roc::proc_ErrEvent, roc::Message::RawSize(), roc::CombinerModule::InputRec::rocid, roc::Message::setEpochMissed(), roc::Message::setEpochNumber(), roc::Message::setMessageType(), roc::Message::setRocNumber(), and roc::CombinerModule::InputRec::use.
Referenced by FillBuffer().
void roc::CombinerModule::FillSimpleBuffer | ( | ) | [protected] |
Definition at line 684 of file CombinerModule.cxx.
References fBufferSize, fInp, roc::CombinerModule::InputRec::format, fOutPool, roc::CombinerModule::InputRec::isrocid(), roc::CombinerModule::InputRec::isudp, roc::Message::RawSize(), roc::CombinerModule::InputRec::rocid, roc::xmlMsgFormat, roc::xmlRocNumber, and roc::xmlTransportKind.
Referenced by ProcessInputEvent(), and ProcessOutputEvent().
bool roc::CombinerModule::FindNextEvent | ( | unsigned | recid | ) | [protected] |
Definition at line 301 of file CombinerModule.cxx.
References roc::Message::CalcDistance(), roc::CombinerModule::InputRec::canCheckAnyGet4, roc::CombinerModule::InputRec::canCheckGet4, roc::CombinerModule::InputRec::curr_epoch, roc::CombinerModule::InputRec::curr_indx, roc::CombinerModule::InputRec::curr_nbuf, roc::CombinerModule::InputRec::data_length, fCalibrationLength, fCalibrationPeriod, fDetectGet4Problem, fGet4ResetLimit, fIgnoreMissingEpoch, fInp, fLastCalibrationTime, fLastGet4ResetTm, fLastSpillTime, roc::CombinerModule::InputRec::format, fSpillAux, fSpillRoc, fSpillState, fSyncNumber, fSyncScaleDown, fThrottleAux, roc::CombinerModule::InputRec::get4AllCnt, roc::CombinerModule::InputRec::get4EdgeCnt, roc::CombinerModule::InputRec::get4EdgeErrs, roc::CombinerModule::InputRec::get4ErrCnt, roc::CombinerModule::InputRec::get4LastTm, roc::Message::getAuxChNum(), roc::Message::getAuxFalling(), roc::Message::getEpoch2ChipNumber(), roc::Message::getEpoch2Number(), roc::Message::getEpoch2Sync(), roc::Message::getEpochNumber(), roc::Message::getGet4ChNum(), roc::Message::getGet4Edge(), roc::Message::getGet4Number(), roc::Message::getMessageType(), roc::Message::getMsgFullTime(), roc::Iterator::getMsgSize(), roc::Message::getRocNumber(), roc::Message::getSyncChNum(), roc::Message::getSyncData(), roc::Message::getSyncTs(), roc::Message::getSysMesData(), roc::Message::getSysMesType(), InitIterator(), InvokeAllGet4Reset(), roc::CombinerModule::InputRec::iscurrepoch, roc::CombinerModule::InputRec::IsDifferentRocId(), roc::CombinerModule::InputRec::isnext, roc::CombinerModule::InputRec::isprev, roc::CombinerModule::InputRec::isready, roc::CombinerModule::InputRec::isrocid(), roc::CombinerModule::InputRec::isudp, roc::CombinerModule::InputRec::last_thottle_tm, roc::CombinerModule::InputRec::last_throttle_state, roc::CombinerModule::InputRec::lastEpoch2, roc::CombinerModule::InputRec::lastEpoch2SyncErr, roc::Iterator::msg(), roc::MSG_AUX, roc::MSG_EPOCH, roc::MSG_EPOCH2, roc::MSG_GET4, roc::MSG_HIT, roc::MSG_SYNC, roc::MSG_SYS, roc::Iterator::next(), roc::CombinerModule::InputRec::next_epoch, roc::CombinerModule::InputRec::next_evnt, roc::CombinerModule::InputRec::next_indx, roc::CombinerModule::InputRec::next_nbuf, roc::CombinerModule::InputRec::next_stamp, roc::CombinerModule::InputRec::prev_epoch, roc::CombinerModule::InputRec::prev_evnt, roc::CombinerModule::InputRec::prev_indx, roc::CombinerModule::InputRec::prev_nbuf, roc::CombinerModule::InputRec::prev_stamp, roc::CombinerModule::InputRec::rocid, SetInfo(), roc::SYSMSG_SYNC_PARITY, roc::SYSMSG_USER, roc::xmlMsgFormat, roc::xmlRocNumber, and roc::xmlTransportKind.
Referenced by ProcessInputEvent(), and SkipEvent().
bool roc::CombinerModule::FlushOutputBuffer | ( | ) | [protected] |
send to output all data, which is now filled into output buffer
Definition at line 1099 of file CombinerModule.cxx.
References f_outptr, fFlushFlag, and fOutBuf.
Referenced by FillBuffer(), and ProcessTimerEvent().
void roc::CombinerModule::InvokeAllGet4Reset | ( | ) | [protected] |
Definition at line 648 of file CombinerModule.cxx.
References fDetectGet4Problem, fInp, and fLastGet4ResetTm.
Referenced by FindNextEvent(), and ProcessTimerEvent().
void roc::CombinerModule::ModuleCleanup | ( | ) | [protected, virtual] |
Definition at line 205 of file CombinerModule.cxx.
References fExtraMessages, and fOutBuf.
void roc::CombinerModule::PoolHandleCleaned | ( | dabc::PoolHandle * | pool | ) | [protected, virtual] |
Definition at line 265 of file CombinerModule.cxx.
void roc::CombinerModule::ProcessInputEvent | ( | dabc::Port * | port | ) | [virtual] |
Definition at line 225 of file CombinerModule.cxx.
References FillBuffer(), FillSimpleBuffer(), FindNextEvent(), and fSimpleMode.
void roc::CombinerModule::ProcessOutputEvent | ( | dabc::Port * | port | ) | [virtual] |
Definition at line 673 of file CombinerModule.cxx.
References FillBuffer(), FillSimpleBuffer(), and fSimpleMode.
void roc::CombinerModule::ProcessTimerEvent | ( | dabc::Timer * | timer | ) | [virtual] |
Definition at line 275 of file CombinerModule.cxx.
References fCalibrationLength, fCalibrationPeriod, fFlushFlag, FlushOutputBuffer(), fSpillAux, fSpillState, and InvokeAllGet4Reset().
void roc::CombinerModule::SetInfo | ( | const std::string & | info, | |
bool | forceinfo = false | |||
) | [protected] |
Definition at line 217 of file CombinerModule.cxx.
Referenced by CombinerModule(), ExecuteCommand(), FillBuffer(), and FindNextEvent().
bool roc::CombinerModule::SkipEvent | ( | unsigned | recid | ) | [protected] |
Definition at line 782 of file CombinerModule.cxx.
References roc::CombinerModule::InputRec::can_skip_buf(), roc::CombinerModule::InputRec::data_length, roc::CombinerModule::InputRec::did_skip_buf(), FindNextEvent(), fInp, roc::CombinerModule::InputRec::firstmbssync, roc::CombinerModule::InputRec::isnext, roc::CombinerModule::InputRec::isprev, roc::CombinerModule::InputRec::isready, roc::CombinerModule::InputRec::next_epoch, roc::CombinerModule::InputRec::next_evnt, roc::CombinerModule::InputRec::next_indx, roc::CombinerModule::InputRec::next_nbuf, roc::CombinerModule::InputRec::next_stamp, roc::CombinerModule::InputRec::nummbssync, roc::CombinerModule::InputRec::prev_epoch, roc::CombinerModule::InputRec::prev_evnt, roc::CombinerModule::InputRec::prev_indx, roc::CombinerModule::InputRec::prev_nbuf, and roc::CombinerModule::InputRec::prev_stamp.
Referenced by FillBuffer().
dabc::Pointer roc::CombinerModule::f_outptr [protected] |
Definition at line 226 of file CombinerModule.h.
Referenced by FillBuffer(), FlushOutputBuffer(), and PoolHandleCleaned().
bool roc::CombinerModule::fBnetMode [protected] |
Definition at line 217 of file CombinerModule.h.
Referenced by CombinerModule(), and FillBuffer().
dabc::BufferSize_t roc::CombinerModule::fBufferSize [protected] |
Definition at line 214 of file CombinerModule.h.
Referenced by CombinerModule(), FillBuffer(), and FillSimpleBuffer().
double roc::CombinerModule::fCalibrationLength [protected] |
Definition at line 234 of file CombinerModule.h.
Referenced by CombinerModule(), FindNextEvent(), and ProcessTimerEvent().
double roc::CombinerModule::fCalibrationPeriod [protected] |
Definition at line 233 of file CombinerModule.h.
Referenced by BeforeModuleStart(), CombinerModule(), FindNextEvent(), and ProcessTimerEvent().
bool roc::CombinerModule::fDetectGet4Problem [protected] |
Definition at line 247 of file CombinerModule.h.
Referenced by CombinerModule(), FindNextEvent(), and InvokeAllGet4Reset().
std::list<MessagesVector*> roc::CombinerModule::fExtraMessages [protected] |
Definition at line 241 of file CombinerModule.h.
Referenced by ExecuteCommand(), FillBuffer(), and ModuleCleanup().
bool roc::CombinerModule::fFlushFlag [protected] |
Definition at line 243 of file CombinerModule.h.
Referenced by CombinerModule(), FlushOutputBuffer(), and ProcessTimerEvent().
double roc::CombinerModule::fGet4ResetLimit [protected] |
Definition at line 245 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
double roc::CombinerModule::fGet4ResetPeriod [protected] |
Definition at line 237 of file CombinerModule.h.
Referenced by CombinerModule().
bool roc::CombinerModule::fIgnoreMissingEpoch [protected] |
Definition at line 220 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
std::vector<InputRec> roc::CombinerModule::fInp [protected] |
Definition at line 223 of file CombinerModule.h.
Referenced by CombinerModule(), ExecuteCommand(), FillBuffer(), FillRawSubeventsBuffer(), FillSimpleBuffer(), FindNextEvent(), InvokeAllGet4Reset(), and SkipEvent().
dabc::PoolHandle* roc::CombinerModule::fInpPool [protected] |
Definition at line 212 of file CombinerModule.h.
Referenced by CombinerModule().
dabc::TimeStamp roc::CombinerModule::fLastCalibrationTime [protected] |
Definition at line 235 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
dabc::TimeStamp roc::CombinerModule::fLastGet4ResetTm [protected] |
Definition at line 246 of file CombinerModule.h.
Referenced by CombinerModule(), FindNextEvent(), and InvokeAllGet4Reset().
uint64_t roc::CombinerModule::fLastSpillTime [protected] |
Definition at line 231 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
dabc::Buffer roc::CombinerModule::fOutBuf [protected] |
Definition at line 225 of file CombinerModule.h.
Referenced by FillBuffer(), FlushOutputBuffer(), ModuleCleanup(), and PoolHandleCleaned().
dabc::PoolHandle* roc::CombinerModule::fOutPool [protected] |
Definition at line 213 of file CombinerModule.h.
Referenced by CombinerModule(), FillBuffer(), FillSimpleBuffer(), and PoolHandleCleaned().
bool roc::CombinerModule::fSimpleMode [protected] |
Definition at line 216 of file CombinerModule.h.
Referenced by CombinerModule(), ProcessInputEvent(), and ProcessOutputEvent().
bool roc::CombinerModule::fSkipErrorData [protected] |
Definition at line 221 of file CombinerModule.h.
Referenced by CombinerModule(), and FillBuffer().
int roc::CombinerModule::fSpillAux [protected] |
Definition at line 229 of file CombinerModule.h.
Referenced by BeforeModuleStart(), CombinerModule(), FindNextEvent(), and ProcessTimerEvent().
int roc::CombinerModule::fSpillRoc [protected] |
Definition at line 228 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
bool roc::CombinerModule::fSpillState [protected] |
Definition at line 230 of file CombinerModule.h.
Referenced by FindNextEvent(), and ProcessTimerEvent().
int roc::CombinerModule::fSyncNumber [protected] |
Definition at line 219 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().
int roc::CombinerModule::fSyncScaleDown [protected] |
Definition at line 218 of file CombinerModule.h.
Referenced by CombinerModule(), FillBuffer(), and FindNextEvent().
int roc::CombinerModule::fThrottleAux [protected] |
Definition at line 239 of file CombinerModule.h.
Referenced by CombinerModule(), and FindNextEvent().