Belle II Software development
|
Class to fill a tree from a set of variables. More...
#include <Recorder.h>
Classes | |
class | Impl |
Record the MVA variables. More... | |
Public Member Functions | |
Recorder (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. | |
Recorder (const std::vector< Named< Float_t * > > &namedVariables, 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 variable names and values addresses as branches to it. | |
~Recorder () | |
Destructor writing the TTree and closing the ROOT File. | |
void | write () |
Write all captured variables to disk. | |
void | capture () |
Capture the registered variable values and write them out. | |
Private Attributes | |
std::unique_ptr< Impl > | m_impl |
Pointer to implementation hiding the details. | |
Class to fill a tree from a set of variables.
Definition at line 29 of file Recorder.h.
Recorder | ( | 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.
PImpl Interface.
setBranches | Function invoked with the underlying TTree as argument which is supposed create Branches and provide the value addresses. |
rootFileName | Name of ROOT file to which should be written. |
treeName | Name of the TTree in the ROOT file. |
Definition at line 139 of file Recorder.cc.
Recorder | ( | const std::vector< Named< Float_t * > > & | namedVariables, |
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 variable names and values addresses as branches to it.
namedVariables | A sequence of named values that are used as addresses of branches |
rootFileName | Name of ROOT file to which should be written. |
treeName | Name of the TTree in the ROOT file. |
Definition at line 146 of file Recorder.cc.
void capture | ( | ) |
Capture the registered variable values and write them out.
Definition at line 169 of file Recorder.cc.
void write | ( | ) |
Write all captured variables to disk.
Definition at line 164 of file Recorder.cc.
|
private |
Pointer to implementation hiding the details.
Definition at line 71 of file Recorder.h.