|
pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
|
Consume an event packet, decode it, and save to buffer. More...
#include <daq_run.h>
Public Member Functions | |
| DecodeAndBuffer (std::size_t nevents, int n_links) | |
| define number of events to buffer and number of links enabled | |
| const std::vector< EventPacket > & | get_buffer () const |
| get buffer | |
| void | set_buffer_size (std::size_t nevents) |
| Set the buffer size. | |
| virtual void | write_event (const EventPacket &ep) override |
| Save to buffer. | |
| virtual void | start_run () override |
| Check that the buffer was read and flushed since last run. | |
Public Member Functions inherited from DecodeAndWrite< EventPacket > | |
| DecodeAndWrite (int n_links) | |
| virtual void | consume (std::vector< uint32_t > &event) final |
| Decode the input event packet into our pflib::packing::SingleROCEventPacket and then call write_event on it. | |
| DecodeAndWrite (int _n_links) | |
Public Member Functions inherited from DAQRunConsumer | |
| virtual void | end_run () |
Private Attributes | |
| std::vector< EventPacket > | ep_buffer_ |
| Buffer for event packets. | |
Additional Inherited Members | |
Protected Attributes inherited from DecodeAndWrite< EventPacket > | |
| mutable::pflib::logging::logger | the_log_ |
| logging for warning messages on empty events | |
Consume an event packet, decode it, and save to buffer.
The constructor takes an argument of the size of the buffer which should be the number of events being collected in the run(s) where this buffer is used.
The buffer can be read out with get_buffer(). The buffer is cleared upon the start of every run.
Avoid copying this potentially large buffer around by using constant references.
|
overridevirtual |
Check that the buffer was read and flushed since last run.
Reimplemented from DAQRunConsumer.
|
overridevirtual |
Save to buffer.
Implements DecodeAndWrite< EventPacket >.