16 #ifndef HADAQ_SorterModule
17 #define HADAQ_SorterModule
19 #ifndef DABC_ModuleAsync
86 int Diff(uint32_t trig1, uint32_t trig2)
88 int res = (int) (trig2) - trig1;
Reference on memory from memory pool.
Represents command with its arguments.
Base class for user-derived code, implementing event-processing.
Manipulator with dabc::Buffer class.
Sorts HADAQ subevents according to trigger number.
dabc::Buffer fOutBuf
output buffer
int Diff(uint32_t trig1, uint32_t trig2)
unsigned fNextBufIndx
next buffer which could be processed
dabc::Pointer fOutPtr
place for new data
virtual int ExecuteCommand(dabc::Command cmd)
Main method where commands are executed.
virtual bool ProcessBuffer(unsigned)
Method called by framework when at least one buffer available in pool handle.
SorterModule(const std::string &name, dabc::Command cmd=nullptr)
void DecremntInputIndex(unsigned cnt=1)
virtual bool ProcessRecv(unsigned)
Method called by framework when at least one buffer available in input port.
unsigned fReadyBufIndx
input buffer index which could be send directly
int fBufCnt
total number of buffers
uint32_t fLastTrigger
last trigger copied into output
virtual bool ProcessSend(unsigned)
Method called by framework when at least one buffer can be send to output port.
uint32_t fTriggersRange
valid range for the triggers, normally 0x1000000
virtual void ProcessTimerEvent(unsigned)
Method called by framework when timer event is produced.
std::vector< SubsRec > fSubs
vector with subevents data in the buffers
bool RemoveUsedSubevents(unsigned num)
Support for HADAQ - HADES DAQ
bool operator()(const SubsRec &l, const SubsRec &r)
SubsComp(SorterModule *_m)
void * subevnt
direct pointer on subevent
uint32_t trig
trigger number