|
gstreamer
|
Adapter that owns a ROOT TTree and provides a type-safe fill interface for gstreamer data. More...
#include <gRootTree.h>
Public Member Functions | |
| ~GRootTree () | |
| Destructor prints a debug trace when a logger is present. | |
| GRootTree (const std::unique_ptr< GEventHeader > &gevent_header, std::shared_ptr< GLogger > &log) | |
| Construct a header tree and register header branches. | |
| GRootTree (const std::string &detectorName, const GTrueInfoData *gdata, std::shared_ptr< GLogger > &log) | |
| Construct a true info tree and register branches from the provided hit. | |
| GRootTree (const std::string &detectorName, const GDigitizedData *gdata, std::shared_ptr< GLogger > &log) | |
| Construct a digitized tree and register branches from the provided hit. | |
| bool | fillTree (const std::unique_ptr< GEventHeader > &gevent_header) |
| Fill the header tree for one event. | |
| bool | fillTree (const std::vector< const GTrueInfoData * > &trueInfoData) |
| Fill the true info tree for one event and one detector. | |
| bool | fillTree (const std::vector< const GDigitizedData * > &digitizedData) |
| Fill the digitized tree for one event and one detector. | |
This class encapsulates:
Fill() Data model:
std::vector<T> where T is int, double, or std::string.Notes:
Definition at line 47 of file gRootTree.h.
|
inline |
Definition at line 51 of file gRootTree.h.
| GRootTree::GRootTree | ( | const std::unique_ptr< GEventHeader > & | gevent_header, |
| std::shared_ptr< GLogger > & | log ) |
Branches registered:
g4localEventNumber threadID timeStamp | gevent_header | Event header providing initial values and schema. |
| log | Logger used for diagnostics. |
Definition at line 8 of file gRootTree.cc.
| GRootTree::GRootTree | ( | const std::string & | detectorName, |
| const GTrueInfoData * | gdata, | ||
| std::shared_ptr< GLogger > & | log ) |
The schema is determined from the variable maps exposed by gdata:
std::vector<double> branchesstd::vector<std::string> branches| detectorName | Tree name (already includes the true info prefix). |
| gdata | Sample true info hit used to determine the schema. |
| log | Logger used for diagnostics. |
Definition at line 26 of file gRootTree.cc.
| GRootTree::GRootTree | ( | const std::string & | detectorName, |
| const GDigitizedData * | gdata, | ||
| std::shared_ptr< GLogger > & | log ) |
The schema is determined from the observable maps exposed by gdata:
std::vector<int> branchesstd::vector<double> branches| detectorName | Tree name (already includes the digitized prefix). |
| gdata | Sample digitized hit used to determine the schema. |
| log | Logger used for diagnostics. |
Definition at line 44 of file gRootTree.cc.
| bool GRootTree::fillTree | ( | const std::unique_ptr< GEventHeader > & | gevent_header | ) |
This clears previous header vectors, pushes the current values, then calls Fill().
| gevent_header | Event header providing values for this entry. |
true on success. Definition at line 61 of file gRootTree.cc.
| bool GRootTree::fillTree | ( | const std::vector< const GDigitizedData * > & | digitizedData | ) |
For each hit:
| digitizedData | Vector of raw pointers to digitized hits. |
true on success. Definition at line 100 of file gRootTree.cc.
| bool GRootTree::fillTree | ( | const std::vector< const GTrueInfoData * > & | trueInfoData | ) |
For each hit:
| trueInfoData | Vector of raw pointers to true info hits. |
true on success. Definition at line 80 of file gRootTree.cc.