6#include <ROOT/RConfig.hxx>
16 ROOT::EnableThreadSafety();
17 std::cout <<
"GstreamerRootFactory: ROOT thread safety enabled" << std::endl;
21static EnableRootTS _enableROOTLocks;
25const std::unique_ptr<GRootTree>& GstreamerRootFactory::getOrInstantiateHeaderTree(
26 [[maybe_unused]]
const std::unique_ptr<GEventHeader>& event_header) {
30 std::cerr <<
"FATAL: log is null in GstreamerRootFactory::getOrInstantiateHeaderTree" << std::endl;
43 treePtr = std::make_unique<GRootTree>(event_header,
log);
50const std::unique_ptr<GRootTree>& GstreamerRootFactory::getOrInstantiateTrueInfoDataTree(
51 const std::string& detectorName,
55 auto& treePtr = gRootTrees[treeName];
57 log->
info(2,
"GstreamerRootFactory",
"Creating GTrueInfoData ROOT tree for ", detectorName);
58 treePtr = std::make_unique<GRootTree>(treeName, gdata,
log);
65const std::unique_ptr<GRootTree>& GstreamerRootFactory::getOrInstantiateDigitizedDataTree(
66 const std::string& detectorName,
70 auto& treePtr = gRootTrees[treeName];
72 log->
info(2,
"GstreamerRootFactory",
"Creating GDigitizedData ROOT tree for ", detectorName);
73 treePtr = std::make_unique<GRootTree>(treeName, gdata,
log);
std::shared_ptr< GLogger > log
void info(int level, Args &&... args) const
void error(int exit_code, Args &&... args) const
Abstract base class for streaming GEMC event or frame data to output media.
ROOT output gstreamer plugin writing event data into TTrees.
ROOT tree adapter used by the ROOT gstreamer plugin.
#define DIGITIZEDNAMEPREFIX
#define TRUEINFONAMEPREFIX
#define ERR_PUBLISH_ERROR
Generic publish-time error (null pointers, invalid state).
GStreamer * GStreamerFactory(const std::shared_ptr< GOptions > &g)