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) { log->error(ERR_CANTOPENOUTPUT, "GstreamerRootFactory: file is not initialized"); }
11
12 if (!trueInfoData.empty()) {
13 const auto& trueInforDataTree = getOrInstantiateTrueInfoDataTree(detectorName, trueInfoData.front());
14
15 return trueInforDataTree->fillTree(trueInfoData);
16 }
17
18 return false;
19}
20
21bool GstreamerRootFactory::publishEventGeneratedParticlesImpl(const std::string& bankName,
22 const GGeneratedParticleBank& particles) {
23 if (rootfile == nullptr) { log->error(ERR_CANTOPENOUTPUT, "GstreamerRootFactory: file is not initialized"); }
24
25 const auto& generatedTree = getOrInstantiateGeneratedParticleTree(bankName, particles);
26 return generatedTree->fillTree(particles);
27}
std::shared_ptr< GLogger > log
void error(int exit_code, Args &&... args) const
std::vector< GGeneratedParticleData > GGeneratedParticleBank
Shared constants and error codes for the gstreamer module.
#define ERR_CANTOPENOUTPUT
Output medium could not be opened successfully.
ROOT streamer plugin declarations.