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

JLAB SRO gstreamer plugin producing binary frame streams (".ev" files). More...

#include <gstreamerJLABSROFactory.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.
 
virtual bool startEventImpl (const std::shared_ptr< GEventDataCollection > &event_data)
 Implementation hook for beginning an event publish sequence.
 
bool publishEventHeader (const std::unique_ptr< GEventHeader > &gevent_header)
 Publish the event header.
 
virtual bool publishEventHeaderImpl (const std::unique_ptr< GEventHeader > &gevent_header)
 Implementation hook for publishing the event header.
 
bool publishEventTrueInfoData (const std::string &detectorName, const std::vector< const GTrueInfoData * > &trueInfoData)
 Publish true (MC) information hits for one detector.
 
virtual bool publishEventTrueInfoDataImpl (const std::string &detectorName, const std::vector< const GTrueInfoData * > &trueInfoData)
 Implementation hook for publishing true info hits for one detector.
 
bool publishEventDigitizedData (const std::string &detectorName, const std::vector< const GDigitizedData * > &digitizedData)
 Publish digitized hits for one detector.
 
virtual bool publishEventDigitizedDataImpl (const std::string &detectorName, const std::vector< const GDigitizedData * > &digitizedData)
 Implementation hook for publishing digitized hits for one detector.
 
bool endEvent (const std::shared_ptr< GEventDataCollection > &event_data)
 End an event publish sequence.
 
virtual bool endEventImpl (const std::shared_ptr< GEventDataCollection > &event_data)
 Implementation hook for ending 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:

  • The plugin constructs a frame header and payload in a std::vector<unsigned int> buffer.
  • The header and payload are written in two steps via the frame hook sequence:
    • publishFrameHeaderImpl() writes the packed header
    • publishPayloadImpl() writes the payload words

Threading:

  • Intended usage is one instance per worker thread (one output file per thread).
  • The output file is owned as a raw std::ofstream* to match existing code; lifetime is managed in openConnection()/closeConnectionImpl().

Definition at line 55 of file gstreamerJLABSROFactory.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: