pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
DecodeAndWriteToCSV Class Reference

specializatin of DecodeAndWrite that holds a std::ofstream for the user with functions for writing the header and events More...

#include <daq_run.h>

Inheritance diagram for DecodeAndWriteToCSV:
[legend]
Collaboration diagram for DecodeAndWriteToCSV:
[legend]

Public Member Functions

 DecodeAndWriteToCSV (const std::string &file_name, std::function< void(std::ofstream &)> write_header, std::function< void(std::ofstream &, const pflib::packing::SingleROCEventPacket &)> write_event)
 
virtual void write_event (const pflib::packing::SingleROCEventPacket &ep) final
 call write_event with our file handle
 
- 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 start_run ()
 
virtual void end_run ()
 

Private Attributes

std::ofstream file_
 output file writing to
 
std::function< void(std::ofstream &, const pflib::packing::SingleROCEventPacket &)> write_event_
 function that writes row(s) to csv given an event
 

Additional Inherited Members

- Protected Attributes inherited from DecodeAndWrite
mutable::pflib::logging::logger the_log_
 logging for warning messages on empty events
 

Detailed Description

specializatin of DecodeAndWrite that holds a std::ofstream for the user with functions for writing the header and events

Member Function Documentation

◆ write_event()

void DecodeAndWriteToCSV::write_event ( const pflib::packing::SingleROCEventPacket & ep)
finalvirtual

call write_event with our file handle

Implements DecodeAndWrite.


The documentation for this class was generated from the following files: