19 #ifndef MBS_MbsTypeDefs
31 #ifndef DABC_eventsapi
124 bool IsPlaceForEvent(uint32_t subeventsize,
bool add_subev_header =
false);
129 bool NewSubevent(uint32_t minrawsize = 0, uint8_t crate = 0, uint16_t procid = 0, uint8_t control = 0);
133 bool AddRawData(
const void* src,
unsigned len);
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()
virtual bool Assign(const dabc::Buffer &buf)
EventsIterator(const std::string &name)
virtual dabc::BufferSize_t EventSize()
Read iterator for MBS events/subevents.
unsigned GetEventSize() const
bool Reset()
Reset iterator - forget pointer on buffer.
unsigned rawdatasize() const
dabc::Pointer GetSubeventsPointer()
Returns pointer, which assign only on subevents.
static unsigned NumEvents(const dabc::Buffer &buf)
bool AssignEventPointer(dabc::Pointer &ptr)
EventHeader * evnt() const
SubeventHeader * subevnt() const
ReadIterator & operator=(const ReadIterator &src)
bool IsLastEvent() const
Returns true if it is last event in the buffer.
dabc::Pointer GetEventPointer()
Returns pointer, which assign on complete event, including header.
bool Reset(const dabc::Buffer &buf)
Initialize iterator on the beginning of the buffer, buffer instance should exists until end of iterat...
Write iterator for MBS events/subevents.
bool Reset(dabc::Buffer &buf)
bool AddSubevent(const dabc::Pointer &source)
bool FinishSubEvent(uint32_t rawdatasz=0)
bool AddRawData(const void *src, unsigned len)
dabc::Buffer CloseAndTransfer(dabc::Buffer &newbuf)
Method could be used to close current buffer and transfer all uncompleted parts to new buffer.
SubeventHeader * subevnt() const
bool IsAnyData() const
Return true if anything was written to the buffer.
dabc::BufferSize_t fFullSize
size of accumulated events
dabc::Pointer fSubData
pointer to place raw data of current subevent
dabc::Pointer fSubPtr
place for subevents
bool NewSubevent(uint32_t minrawsize=0, uint8_t crate=0, uint16_t procid=0, uint8_t control=0)
bool IsAnyEvent() const
Return true if any complete event was written to the buffer.
void DiscardEvent()
Ignore all data, which were add with last NewEvent call.
bool IsPlaceForRawData(unsigned len) const
bool NewSubevent2(uint32_t fullid)
bool IsAnyIncompleteData() const
Return true if any incomplete data were provided to the iterator.
uint32_t maxrawdatasize() const
bool CopyEventFrom(const dabc::Pointer &ptr, bool finish=true)
Method to copy full event from the other place.
dabc::Pointer fEvPtr
place for current event
bool NewEvent(EventNumType event_number=0, uint32_t subeventsize=0)
bool IsEventStarted() const
Return true if new event was started and was not yet closed.
dabc::Buffer fBuffer
here we keep buffer - mean onwership is delivered to iterator
EventHeader * evnt() const
bool IsPlaceForEvent(uint32_t subeventsize, bool add_subev_header=false)
Support for MBS - standard GSI DAQ.