|
pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
|
Consume an event packet, decode it, and save to buffer. More...
#include <daq_run.h>
Public Member Functions | |
| DecodeAndBuffer (int nevents) | |
| const std::vector< pflib::packing::SingleROCEventPacket > & | get_buffer () const |
| get buffer | |
| void | set_buffer_size (int nevents) |
| Set the buffer size. | |
| virtual void | write_event (const pflib::packing::SingleROCEventPacket &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 | |
| 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. | |
Public Member Functions inherited from DAQRunConsumer | |
| virtual void | end_run () |
Private Attributes | |
| std::vector< pflib::packing::SingleROCEventPacket > | ep_buffer_ |
| Buffer for event packets. | |
Additional Inherited Members | |
Protected Attributes inherited from DecodeAndWrite | |
| 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.