pflib v3.9.4-7-gb2e7f4f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
DecodeAndWrite< EventPacket > Class Template Referenceabstract

Consume an event packet, decode it, and then do something else. More...

#include <daq_run.h>

Inheritance diagram for DecodeAndWrite< EventPacket >:
[legend]
Collaboration diagram for DecodeAndWrite< EventPacket >:
[legend]

Public Member Functions

 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.
 
virtual void write_event (const EventPacket &ep)=0
 pure virtual function for writing out decoded event
 
 DecodeAndWrite (int _n_links)
 
- Public Member Functions inherited from DAQRunConsumer
virtual void start_run ()
 
virtual void end_run ()
 

Protected Attributes

mutable::pflib::logging::logger the_log_
 logging for warning messages on empty events
 

Private Attributes

EventPacket ep_
 event packet for decoding
 

Detailed Description

template<class EventPacket>
class DecodeAndWrite< EventPacket >

Consume an event packet, decode it, and then do something else.

This class holds the event packet for the user so that other code just needs to write functions that define how the decoded data should be written out.

Constructor & Destructor Documentation

◆ DecodeAndWrite()

template<class EventPacket >
DecodeAndWrite< EventPacket >::DecodeAndWrite ( int n_links)
explicit
Parameters
[in]n_linksnumber of links is necessary for the ECOND event packet but for the SingleROC it is always 2 (both halves) and is therefore ignored

Member Function Documentation

◆ consume()

template<class EventPacket >
void DecodeAndWrite< EventPacket >::consume ( std::vector< uint32_t > & event)
finalvirtual

Decode the input event packet into our pflib::packing::SingleROCEventPacket and then call write_event on it.

Implements DAQRunConsumer.

◆ write_event()

template<class EventPacket >
virtual void DecodeAndWrite< EventPacket >::write_event ( const EventPacket & ep)
pure virtual

pure virtual function for writing out decoded event

Implemented in DecodeAndBuffer< EventPacket >, and DecodeAndWriteToCSV< EventPacket >.


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