![]() |
Belle II Software
release-08-02-04
|
Class to write collected variables into a root file, Used by VXDQETrainingDataCollectorModule. More...
#include <SimpleVariableRecorder.h>

Public Member Functions | |
| SimpleVariableRecorder (const std::function< void(TTree &)> &setBranches, const std::string &rootFileName, const std::string &treeName="recorded_tree") | |
| Construct the Recorder opening the given ROOT file and create the underlying TTree and add let the given function setup branches. More... | |
| SimpleVariableRecorder (std::vector< Named< float * >> &namedVariables, const std::string &fileName, const std::string &treeName) | |
| Construct the Recorder opening the given ROOT file and create the underlying TTree and add let the given function setup branches. More... | |
| ~SimpleVariableRecorder () | |
| Destructor that closes used TTrees and TFiles. | |
| SimpleVariableRecorder (SimpleVariableRecorder &)=delete | |
| copy constructor needs to be implemented if needed as class has dynamic memory/resource allocation (as pointed out by cppcheck) | |
| SimpleVariableRecorder & | operator= (SimpleVariableRecorder &)=delete |
| assignment operator ("=") needs to be implemented if needed as class has dynamic memory/resource allocation (as pointed out by cppcheck) | |
| void | record () |
| Record varibles by filling the TTree. | |
| void | write () |
| Write out TFile to root file. | |
Protected Attributes | |
| TFile * | m_tFile |
| ROOT file to which should be written. | |
| StoreObjPtr< RootMergeable< TTree > > | m_tTree |
| TTree that contains recorded variables. | |
Class to write collected variables into a root file, Used by VXDQETrainingDataCollectorModule.
Definition at line 32 of file SimpleVariableRecorder.h.
|
inline |
Construct the Recorder opening the given ROOT file and create the underlying TTree and add let the given function setup branches.
| setBranches | Function invoked with the underlying TTree as argument which is supposed create Branches and provide the value adresses. |
| rootFileName | Name of ROOT file to which should be written. |
| treeName | Name of the TTree in the ROOT file. |
Definition at line 45 of file SimpleVariableRecorder.h.
|
inline |
Construct the Recorder opening the given ROOT file and create the underlying TTree and add let the given function setup branches.
| namedVariables | Vector of collected named varibles to be turned into Branches in a TTree |
| fileName | Name of ROOT file to which should be written. |
| treeName | Name of the TTree in the ROOT file. |
Definition at line 79 of file SimpleVariableRecorder.h.