gstreamer
Loading...
Searching...
No Matches
publishTrueInfo.cc
Go to the documentation of this file.
1// gstreamer
4
5// Implementation summary:
6// Fill one detector true-information ROOT tree for the current event.
7
8bool GstreamerRootFactory::publishEventTrueInfoDataImpl(const std::string& detectorName,
9 const std::vector<const GTrueInfoData*>& trueInfoData) {
10 if (rootfile == nullptr) {
11 log->error(gstreamer::ERR_CANTOPENOUTPUT, "GstreamerRootFactory: file is not initialized");
12 }
13
14 if (!trueInfoData.empty()) {
15 const auto& trueInforDataTree = getOrInstantiateTrueInfoDataTree(detectorName, trueInfoData.front());
16
17 return trueInforDataTree->fillTree(trueInfoData);
18 }
19
20 return false;
21}
22
23bool GstreamerRootFactory::publishEventGeneratedParticlesImpl(const std::string& bankName,
24 const GGeneratedParticleBank& particles) {
25 if (rootfile == nullptr) {
26 log->error(gstreamer::ERR_CANTOPENOUTPUT, "GstreamerRootFactory: file is not initialized");
27 }
28
29 const auto& generatedTree = getOrInstantiateGeneratedParticleTree(bankName, particles);
30 return generatedTree->fillTree(particles);
31}
32
33bool GstreamerRootFactory::publishEventAncestorsImpl(const GAncestorBank& ancestors) {
34 if (rootfile == nullptr) {
35 log->error(gstreamer::ERR_CANTOPENOUTPUT, "GstreamerRootFactory: file is not initialized");
36 }
37 return getOrInstantiateAncestorTree(ancestors)->fillTree(ancestors);
38}
std::shared_ptr< GLogger > log
std::vector< GAncestorData > GAncestorBank
std::vector< GGeneratedParticleData > GGeneratedParticleBank
Shared constants and error codes for the gstreamer module.
ROOT streamer plugin declarations.
constexpr int ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.