2#include "Packing/SingleSubsystemUnpacker.h"
20 std::vector<uint8_t> buff;
22 EXCEPTION_RAISE(
"MalForm",
"Raw file provided was unable to read " +
24 " bytes in an event.");
#define DECLARE_PRODUCER_NS(NS, CLASS)
Macro which allows the framework to construct a producer given its name during configuration.
void abortEvent()
Abort the event immediately.
Implements an event buffer system for storing event data.
Class encapsulating parameters for configuring a processor.
T getParameter(const std::string &name) const
Retrieve the parameter of the given name.
std::string detector_name_
Detector file name.
utility::Reader reader_
raw data file we are reading
int num_bytes_per_event_
number of bytes in each event
std::string output_name_
destination object name
void beforeNewRun(ldmx::RunHeader &rh) override
Handle allowing producers to modify run headers before the run begins.
void produce(framework::Event &event) override
Actually do the unpacking/decoding.
void configure(framework::config::Parameters &ps) override
Configure the unpacker and open the raw data file for IO.
void open(const std::string &file_name)
Open a file with this reader.
bool eof()
check if file is done
Reader & read(WordType *w, std::size_t count)
Read the next 'count' words into the input handle.