Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
DataManager.cxx
1/*
2 * HalDataManager.cxx
3 *
4 * Created on: 7 wrz 2021
5 * Author: Daniel Wielanek
6 * E-mail: daniel.wielanek@gmail.com
7 * Warsaw University of Technology, Faculty of Physics
8 */
9
10#include "DataManager.h"
11
12#include "IOManager.h"
13#include "MagField.h"
14
15#include <RtypesCore.h>
16#include <TChain.h>
17#include <TTree.h>
18namespace Hal {
19 DataManager::DataManager(IOManager* mngr) : fManager(mngr) {}
20
21 DataManager* DataManager::Instance() {
22
23 thread_local DataManager mngr;
24 return &mngr;
25 }
26
27 DataManager::~DataManager() {}
28
29 Int_t DataManager::GetEntries() const { return fManager->GetEntries(); }
30
31 Int_t DataManager::GetEntry(Int_t i, Int_t flag) { return fManager->GetEntry(i, flag); }
32
33 Bool_t DataManager::Init() { return fManager->Init(); }
34
35 void DataManager::Register(const char* name, const char* folderName, TNamed* obj, Bool_t toFile) {
36 fManager->Register(name, folderName, obj, toFile);
37 }
38
39 void DataManager::Register(const char* name, const char* Foldername, TCollection* obj, Bool_t toFile) {
40 fManager->Register(name, Foldername, obj, toFile);
41 }
42
43 void DataManager::SetInChain(TChain* tempChain, Int_t ident) { fManager->SetInChain(tempChain, ident); }
44
45 void DataManager::UpdateBranches() { fManager->UpdateBranches(); }
46
47 Bool_t DataManager::CheckBranch(const char* BrName) {
48 if (fManager->GetBranchStatus(BrName) != BranchInfo::EFlag::kNull) return kTRUE;
49 return kFALSE;
50 }
51
52 TObject* DataManager::GetObject(const char* BrName) { return fManager->GetObject(BrName); }
53
54 const std::vector<TString> DataManager::GetBranchNameList() { return fManager->GetBranchNameList(); }
55
56 MagField* DataManager::GetField() const { return fManager->GetField(); }
57
58 TString DataManager::GetSourceName() const { return fManager->GetSourceName(); }
59
60 void DataManager::GetIOManagerInfo() { fManager->PrintInfo(); }
61
62 /****************************************************************************************************************************/
63} // namespace Hal