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

ROOT output gstreamer plugin writing event data into TTrees. More...

#include <gstreamerROOTFactory.h>

Public Member Functions

 GStreamer (const std::shared_ptr< GOptions > &g)
 Construct a streamer and bind it to module logging.
 
- 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:

  • A single ROOT file is created per streamer instance (typically one instance per thread).
  • The plugin maintains a map of GRootTree objects:
    • one header tree (key HEADERTREENAME)
    • one true info tree per detector (name prefixed by TRUEINFONAMEPREFIX)
    • one digitized tree per detector (name prefixed by DIGITIZEDNAMEPREFIX)

The plugin creates trees lazily on first use to match the variable set encountered in data.

Threading:

  • Intended usage is one plugin instance per thread (one output file per thread).
  • ROOT thread safety is enabled in the plugin initialization code.

Definition at line 27 of file gstreamerROOTFactory.h.

Member Function Documentation

◆ GStreamer()

GStreamer::GStreamer ( const std::shared_ptr< GOptions > & g)
inlineexplicit
Parameters
gOptions container used to initialize logging and configuration.

Definition at line 72 of file gstreamer.h.


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