 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/Module.h>
14 #include <analysis/VariableManager/Manager.h>
15 #include <framework/datastore/StoreObjPtr.h>
16 #include <framework/pcore/RootMergeable.h>
36 class VariablesToHistogramModule :
public Module {
47 virtual void event()
override;
55 std::vector<std::tuple<std::string, int, float, float>>
m_variables;
57 std::vector<std::tuple<std::string, int, float, float, std::string, int, float, float>>
m_variables_2d;
64 std::shared_ptr<TFile>
m_file{
nullptr};
66 std::vector<std::unique_ptr<StoreObjPtr<RootMergeable<TH1D>>>>
m_hists;
68 std::vector<std::unique_ptr<StoreObjPtr<RootMergeable<TH2D>>>>
m_2d_hists;
70 std::vector<Variable::Manager::FunctionPtr>
m_functions;
std::vector< std::tuple< std::string, int, float, float > > m_variables
List of variables to save.
virtual void initialize() override
Initialises the module.
std::string m_fileName
Name of ROOT file for output.
std::vector< std::tuple< std::string, int, float, float, std::string, int, float, float > > m_variables_2d
List of pairs of variables to save.
virtual void terminate() override
Write TTree to file, and close file if necessary.
std::vector< std::unique_ptr< StoreObjPtr< RootMergeable< TH2D > > > > m_2d_hists
The ROOT TH2Ds for output.
Abstract base class for different kinds of events.
std::string m_particleList
Name of particle list with reconstructed particles.
std::vector< Variable::Manager::FunctionPtr > m_functions_2d_1
List of function pointers corresponding to given variables.
std::shared_ptr< TFile > m_file
ROOT file for output.
VariablesToHistogramModule()
Constructor.
virtual void event() override
Method called for each event.
std::vector< Variable::Manager::FunctionPtr > m_functions_2d_2
List of function pointers corresponding to given variables.
std::vector< std::unique_ptr< StoreObjPtr< RootMergeable< TH1D > > > > m_hists
The ROOT TH1Ds for output.
std::string m_directory
Name of the Directory.
std::vector< Variable::Manager::FunctionPtr > m_functions
List of function pointers corresponding to given variables.