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
39{
40public:
43
48
49private:
57 bool openConnection() override;
58
64 bool closeConnectionImpl() override;
65
72 bool startEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
73
80 bool endEventImpl([[maybe_unused]] const std::shared_ptr<GEventDataCollection>& event_data) override;
81
88 bool publishEventHeaderImpl([[maybe_unused]] const std::unique_ptr<GEventHeader>& gevent_header) override;
89
97 bool publishEventTrueInfoDataImpl(const std::string& detectorName,
98 const std::vector<const GTrueInfoData*>& trueInfoData) override;
99
107 bool publishEventDigitizedDataImpl(const std::string& detectorName,
108 const std::vector<const GDigitizedData*>& digitizedData) override;
109
120 bool publishEventGeneratedParticlesImpl(const std::string& bankName,
121 const GGeneratedParticleBank& particles) override;
122
124 bool publishEventAncestorsImpl(const GAncestorBank& ancestors) override;
125
132 bool startRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
133
140 bool endRunImpl([[maybe_unused]] const std::shared_ptr<GRunDataCollection>& run_data) override;
141
149 bool publishRunDigitizedDataImpl(const std::string& detectorName,
150 const std::vector<const GDigitizedData*>& digitizedData) override;
151
158 bool startStreamImpl(const GFrameDataCollection* frameRunData) override;
159
166 bool endStreamImpl(const GFrameDataCollection* frameRunData) override;
167
174 bool publishFrameHeaderImpl(const GFrameHeader* gframeHeader) override;
175
182 bool publishPayloadImpl(const std::vector<GIntegralPayload*>* payload) override;
183
185 std::ofstream ofile;
186
192 [[nodiscard]] std::string filename() const override { return gstreamer_definitions.rootname + ".txt"; }
193};
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< GAncestorData > GAncestorBank
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.