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
38{
39public:
42
47
48private:
56 bool openConnection() override;
57
63 bool closeConnectionImpl() override;
64
71 bool startEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
72
79 bool endEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
80
87 bool publishEventHeaderImpl([[maybe_unused]] const std::unique_ptr<GEventHeader>& gevent_header) override;
88
96 bool publishEventTrueInfoDataImpl(const std::string& detectorName,
97 const std::vector<const GTrueInfoData*>& trueInfoData) override;
98
106 bool publishEventDigitizedDataImpl(const std::string& detectorName,
107 const std::vector<const GDigitizedData*>& digitizedData) override;
108
119 bool publishEventGeneratedParticlesImpl(const std::string& bankName,
120 const GGeneratedParticleBank& particles) override;
121
128 bool startRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
129
136 bool endRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
137
145 bool publishRunDigitizedDataImpl(const std::string& detectorName,
146 const std::vector<const GDigitizedData*>& digitizedData) override;
147
154 bool startStreamImpl(const GFrameDataCollection* frameRunData) override;
155
162 bool endStreamImpl(const GFrameDataCollection* frameRunData) override;
163
170 bool publishFrameHeaderImpl(const GFrameHeader* gframeHeader) override;
171
178 bool publishPayloadImpl(const std::vector<GIntegralPayload*>* payload) override;
179
181 std::ofstream ofile;
182
188 [[nodiscard]] std::string filename() const override { return gstreamer_definitions.rootname + ".txt"; }
189};
Abstract base class for all gstreamer output plugins.
Definition gstreamer.h:78
GStreamer(const std::shared_ptr< GOptions > &g)
Construct the streamer base and initialize module logging.
Definition gstreamer.h:85
GStreamerDefinition gstreamer_definitions
Output definition currently bound to this streamer instance.
Definition gstreamer.h:207
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
std::vector< GGeneratedParticleData > GGeneratedParticleBank
Core streaming interface and helper utilities for the gstreamer module.
std::string rootname
Base output filename without extension, optionally specialized by thread id.