gstreamer
Loading...
Searching...
No Matches
gstreamerASCIIFactory.h
Go to the documentation of this file.
1#pragma once
2
3// gstreamer
4#include "gstreamer.h"
5
6// c++
7#include <fstream>
8
37{
38public:
41
46
47private:
55 bool openConnection() override;
56
62 bool closeConnectionImpl() override;
63
70 bool startEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
71
78 bool endEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
79
86 bool publishEventHeaderImpl([[maybe_unused]] const std::unique_ptr<GEventHeader>& gevent_header) override;
87
95 bool publishEventTrueInfoDataImpl(const std::string& detectorName,
96 const std::vector<const GTrueInfoData*>& trueInfoData) override;
97
105 bool publishEventDigitizedDataImpl(const std::string& detectorName,
106 const std::vector<const GDigitizedData*>& digitizedData) override;
107
114 bool startRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
115
122 bool endRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
123
131 bool publishRunDigitizedDataImpl(const std::string& detectorName,
132 const std::vector<const GDigitizedData*>& digitizedData) override;
133
140 bool startStreamImpl(const GFrameDataCollection* frameRunData) override;
141
148 bool endStreamImpl(const GFrameDataCollection* frameRunData) override;
149
156 bool publishFrameHeaderImpl(const GFrameHeader* gframeHeader) override;
157
164 bool publishPayloadImpl(const std::vector<GIntegralPayload*>* payload) override;
165
167 std::ofstream ofile;
168
174 [[nodiscard]] std::string filename() const override { return gstreamer_definitions.rootname + ".txt"; }
175};
Abstract base class for all gstreamer output plugins.
Definition gstreamer.h:77
GStreamer(const std::shared_ptr< GOptions > &g)
Construct the streamer base and initialize module logging.
Definition gstreamer.h:84
GStreamerDefinition gstreamer_definitions
Output definition currently bound to this streamer instance.
Definition gstreamer.h:206
ASCII plugin that writes human-readable event, run, and frame content to a text file.
GstreamerTextFactory & operator=(GstreamerTextFactory &&)=delete
GstreamerTextFactory(GstreamerTextFactory &&)=delete
GstreamerTextFactory(const GstreamerTextFactory &)=delete
GstreamerTextFactory & operator=(const GstreamerTextFactory &)=delete
Core streaming interface and helper utilities for the gstreamer module.
std::string rootname
Base output filename without extension, optionally specialized by thread id.