gstreamer
Loading...
Searching...
No Matches
GstreamerCsvFactory Class Reference

CSV gstreamer plugin writing flattened per-hit rows for true and digitized data. More...

#include <gstreamerCSVFactory.h>

Public Member Functions

 GstreamerCsvFactory (const GstreamerCsvFactory &)=delete
 
GstreamerCsvFactoryoperator= (const GstreamerCsvFactory &)=delete
 
 GstreamerCsvFactory (GstreamerCsvFactory &&)=delete
 
GstreamerCsvFactoryoperator= (GstreamerCsvFactory &&)=delete
 
 GStreamer (const std::shared_ptr< GOptions > &g)
 Inherit the base constructor taking (const std::shared_ptr<GOptions>&).
 
- Public Member Functions inherited from GStreamer
 GStreamer (const std::shared_ptr< GOptions > &g)
 Construct a streamer and bind it to module logging.
 
virtual ~GStreamer ()=default
 Virtual destructor.
 
bool closeConnection ()
 Close the output medium after flushing any buffered events.
 
void publishEventData (const std::shared_ptr< GEventDataCollection > &event_data)
 Buffer an event for later serialization.
 
std::string getStreamType () const
 Return the semantic stream type for this streamer.
 
void define_gstreamer (const GStreamerDefinition &gstreamerDefinition, int tid=-1)
 Assign the output definition used by this streamer instance.
 
void set_loggers (const std::shared_ptr< GOptions > &g)
 Configure streamer settings derived from options.
 
- Public Member Functions inherited from GBase< GStreamer >
 GBase (const std::shared_ptr< GOptions > &gopt, std::string logger_name="")
 
 GBase (const std::shared_ptr< GLogger > &logger)
 
 GBase (const GBase &)=default
 
 GBase (GBase &&) noexcept=default
 
virtual ~GBase ()
 
GBaseoperator= (const GBase &)=default
 
GBaseoperator= (GBase &&) noexcept=default
 

Additional Inherited Members

- Static Public Member Functions inherited from GStreamer
static const std::vector< std::string > & supported_formats ()
 Return the list of supported output formats.
 
static bool is_valid_format (const std::string &format)
 Check whether a format token is supported.
 
static GStreamerinstantiate (const dlhandle h, std::shared_ptr< GOptions > g)
 Instantiate a streamer plugin by resolving the GStreamerFactory symbol from a dynamic library.
 
- Protected Member Functions inherited from GStreamer
bool startEvent (const std::shared_ptr< GEventDataCollection > &event_data)
 Begin an event publish sequence.
 
bool publishEventHeader (const std::unique_ptr< GEventHeader > &gevent_header)
 Publish the event header.
 
bool publishEventTrueInfoData (const std::string &detectorName, const std::vector< const GTrueInfoData * > &trueInfoData)
 Publish true (MC) information hits for one detector.
 
bool publishEventDigitizedData (const std::string &detectorName, const std::vector< const GDigitizedData * > &digitizedData)
 Publish digitized hits for one detector.
 
bool endEvent (const std::shared_ptr< GEventDataCollection > &event_data)
 End an event publish sequence.
 
bool startStream (const GFrameDataCollection *frameRunData)
 Begin a frame stream publish sequence.
 
bool publishFrameHeader (const GFrameHeader *gframeHeader)
 Publish a frame header.
 
bool publishPayload (const std::vector< GIntegralPayload * > *payload)
 Publish a frame payload.
 
bool endStream (const GFrameDataCollection *frameRunData)
 End a frame stream publish sequence.
 
void flushEventBuffer ()
 Flush the internal event buffer, writing all buffered events to the output medium.
 
- Protected Attributes inherited from GStreamer
GStreamerDefinition gstreamer_definitions
 Output definition used by this streamer (format, base name, type, thread id).
 
- Protected Attributes inherited from GBase< GStreamer >
std::shared_ptr< GLoggerlog
 

Detailed Description

Output model:

  • Two CSV files are produced per streamer instance:
    • "<rootname>_true_info.csv"
    • "<rootname>_digitized.csv"
  • A header row is emitted the first time a non-empty hit vector is encountered.
  • Each subsequent hit is written as a single row containing:
    • event number, timestamp, thread id, detector name
    • then hit variables (string/double for true info, int/double for digitized)

Threading:

  • Intended usage is one instance per worker thread.
  • Copy/move is disabled to prevent accidental sharing of file streams and internal state.

Definition at line 26 of file gstreamerCSVFactory.h.

Constructor & Destructor Documentation

◆ GstreamerCsvFactory() [1/2]

GstreamerCsvFactory::GstreamerCsvFactory ( const GstreamerCsvFactory & )
delete

◆ GstreamerCsvFactory() [2/2]

GstreamerCsvFactory::GstreamerCsvFactory ( GstreamerCsvFactory && )
delete

Member Function Documentation

◆ GStreamer()

GStreamer::GStreamer ( const std::shared_ptr< GOptions > & g)
inlineexplicit

Definition at line 72 of file gstreamer.h.

◆ operator=() [1/2]

GstreamerCsvFactory & GstreamerCsvFactory::operator= ( const GstreamerCsvFactory & )
delete

◆ operator=() [2/2]

GstreamerCsvFactory & GstreamerCsvFactory::operator= ( GstreamerCsvFactory && )
delete

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