CbmRoot
CbmConverterManager.h
Go to the documentation of this file.
1 #ifndef ANALYSIS_TREE_CONVERTERMANAGER_H_
2 #define ANALYSIS_TREE_CONVERTERMANAGER_H_
3 
4 #include "FairTask.h"
5 
6 namespace AnalysisTree {
7  class Configuration;
8  class DataHeader;
9 } // namespace AnalysisTree
10 
11 class CbmConverterTask;
12 
13 class CbmConverterManager : public FairTask {
14 
15 public:
16  CbmConverterManager() = default;
17  ~CbmConverterManager() override;
18 
19  InitStatus Init() override;
20  void Exec(Option_t* opt) override;
21  void Finish() override;
22 
23  void AddTask(CbmConverterTask* task) { tasks_.emplace_back(task); }
24  void SetOutFileName(std::string name) { out_file_name_ = std::move(name); }
25  void SetOutTreeName(std::string name) { out_tree_name_ = std::move(name); }
26 
27  void SetSystem(const std::string& system) { system_ = system; }
28  void SetBeamMomentum(float beam_mom) { beam_mom_ = beam_mom; }
29 
30 private:
31  void FillDataHeader();
32 
33  TFile* out_file_ {nullptr};
34  TTree* out_tree_ {nullptr};
35  std::string out_file_name_ {""};
36  std::string out_tree_name_ {""};
37 
38  std::string system_ {""};
39  float beam_mom_ {0.};
40 
41  AnalysisTree::Configuration* out_config_ {nullptr};
42  AnalysisTree::DataHeader* data_header_ {nullptr};
43  std::vector<CbmConverterTask*> tasks_ {};
44 
45  std::map<std::string, std::map<int, int>>
47 
48  ClassDefOverride(CbmConverterManager, 1)
49 };
50 
51 #endif // ANALYSIS_TREE_CONVERTERMANAGER_H_
CbmConverterManager::SetSystem
void SetSystem(const std::string &system)
Definition: CbmConverterManager.h:27
CbmConverterManager::~CbmConverterManager
~CbmConverterManager() override
Definition: CbmConverterManager.cxx:122
CbmConverterManager::SetOutTreeName
void SetOutTreeName(std::string name)
Definition: CbmConverterManager.h:25
CbmConverterManager::system_
std::string system_
Definition: CbmConverterManager.h:38
CbmConverterManager::out_file_name_
std::string out_file_name_
Definition: CbmConverterManager.h:35
CbmConverterManager::out_tree_name_
std::string out_tree_name_
Definition: CbmConverterManager.h:36
CbmConverterManager::index_map_
std::map< std::string, std::map< int, int > > index_map_
map CbmRoot to AT of indexes for a given branch
Definition: CbmConverterManager.h:46
CbmConverterManager::tasks_
std::vector< CbmConverterTask * > tasks_
Definition: CbmConverterManager.h:43
CbmConverterManager::AddTask
void AddTask(CbmConverterTask *task)
Definition: CbmConverterManager.h:23
CbmConverterManager::Exec
void Exec(Option_t *opt) override
Definition: CbmConverterManager.cxx:38
CbmConverterManager::FillDataHeader
void FillDataHeader()
Definition: CbmConverterManager.cxx:64
CbmConverterManager::data_header_
AnalysisTree::DataHeader * data_header_
Definition: CbmConverterManager.h:42
CbmConverterManager::CbmConverterManager
CbmConverterManager()=default
CbmConverterManager::out_file_
TFile * out_file_
Definition: CbmConverterManager.h:33
task
@ task
Definition: CbmMvdSensorPlugin.h:22
CbmConverterManager::out_config_
AnalysisTree::Configuration * out_config_
Definition: CbmConverterManager.h:41
AnalysisTree
Definition: CbmConverterManager.h:6
CbmConverterManager::out_tree_
TTree * out_tree_
Definition: CbmConverterManager.h:34
CbmConverterManager::Init
InitStatus Init() override
CbmConverterManager::SetBeamMomentum
void SetBeamMomentum(float beam_mom)
Definition: CbmConverterManager.h:28
CbmConverterManager::SetOutFileName
void SetOutFileName(std::string name)
Definition: CbmConverterManager.h:24
CbmConverterManager
Definition: CbmConverterManager.h:13
CbmConverterManager::beam_mom_
float beam_mom_
Definition: CbmConverterManager.h:39
CbmConverterManager::Finish
void Finish() override
Definition: CbmConverterManager.cxx:51
CbmConverterTask
Definition: CbmConverterTask.h:8