16 #ifndef HADAQ_Iterator
17 #define HADAQ_Iterator
19 #ifndef HADAQ_HadaqTypeDefs
31 #ifndef DABC_eventsapi
115 bool NewEvent(uint32_t evtSeqNr = 0, uint32_t runNr = 0, uint32_t minsubeventsize = 0);
116 bool NewSubevent(uint32_t minrawsize = 0, uint32_t trigger = 0);
176 virtual bool GenerateEvent(uint64_t evid, uint64_t subid, uint64_t raw_size)
Reference on memory from memory pool.
Iterator over events in dabc::Buffer class.
Manipulator with dabc::Buffer class.
BufferSize_t fullsize() const
bool null() const
Returns true if reference contains nullptr.
virtual ~EventsIterator()
EventsIterator(const std::string &name)
virtual dabc::BufferSize_t EventSize()
virtual bool Assign(const dabc::Buffer &buf)
virtual bool GenerateEvent(uint64_t evid, uint64_t subid, uint64_t raw_size)
virtual bool Assign(const dabc::Buffer &buf)
EventsProducer(const std::string &name)
virtual ~EventsProducer()
Read iterator for HADAQ events/subevents.
static unsigned NumEvents(const dabc::Buffer &buf)
bool Reset()
Reset iterator - forget pointer on buffer.
uint32_t rawdatasize() const
bool NextEvent()
Used for ready HLD events.
hadaq::RawSubevent * subevnt() const
unsigned rawdata_maxsize() const
Try to define maximal length for the raw data.
unsigned remained_size() const
Returns size used by current event plus rest.
bool AssignEventPointer(dabc::Pointer &ptr)
unsigned evntsize() const
hadaq::HadTu * hadtu() const
bool NextSubEvent()
Used for sub-events iteration inside current block.
hadaq::RawEvent * evnt() const
bool NextHadTu()
Used for raw data from TRBs.
bool NextSubeventsBlock()
Depending from buffer type calls NextHadTu() or NextEvent()
bool Reset(const dabc::Buffer &buf)
Initialize iterator on the beginning of the buffer, buffer instance should exists until end of iterat...
ReadIterator & operator=(const ReadIterator &src)
Write iterator for HADAQ events/subevents.
hadaq::RawEvent * evnt() const
bool NewEvent(uint32_t evtSeqNr=0, uint32_t runNr=0, uint32_t minsubeventsize=0)
bool IsPlaceForEvent(uint32_t subeventsize)
bool FinishSubEvent(uint32_t rawdatasz)
dabc::BufferSize_t fFullSize
bool AddAllSubevents(hadaq::RawEvent *evnt)
uint32_t maxrawdatasize() const
bool NewSubevent(uint32_t minrawsize=0, uint32_t trigger=0)
bool AddSubevent(const dabc::Pointer &source)
bool AddSubevent(hadaq::RawSubevent *sub)
hadaq::RawSubevent * subevnt() const
bool Reset(const dabc::Buffer &buf)
Support for HADAQ - HADES DAQ
HADES transport unit header.
uint32_t GetPaddedSize() const
RawSubevent * FirstSubevent()
uint32_t AllSubeventsSize()
Hadaq subevent structure.
void * RawData() const
Return pointer where raw data should starts.