Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
InputDataInfo.h
1/*
2 * ChainBuilder.h
3 *
4 * Created on: 19 cze 2024
5 * Author: daniel
6 */
7
8#ifndef HAL_FEATURES_IO_INPUTDATAINFO_H_
9#define HAL_FEATURES_IO_INPUTDATAINFO_H_
10
11#include <TObject.h>
12#include <TString.h>
13
14#include <vector>
15
16class TChain;
20namespace Hal {
21
22 class InputDataInfo : public TObject {
23 protected:
24 std::vector<std::vector<TString>> fFileNames;
25 TString fListName;
26
27 public:
33 InputDataInfo(TString file = "data.root");
39 InputDataInfo(std::initializer_list<TString> fileLists);
44 InputDataInfo(std::vector<std::vector<TString>> files);
51 TString GetSafeFile(Int_t level, Int_t entry) const;
57 std::vector<TString> GetSafeFiles(Int_t level) const;
58 void AddFile(TString file);
59 void AddFriend(TString file, Int_t level);
60 void OverwriteSourceName(TString name) { fListName = name; }
61 virtual void Print(Option_t* option = "") const;
62 Int_t GetNFiles() const;
63 Int_t GetFriendsLevel() const;
64 TString GetSourceName() const { return fListName; }
65 std::vector<std::vector<TString>> GetListOfFiles() const { return fFileNames; }
66 virtual ~InputDataInfo() {};
67 ClassDef(InputDataInfo, 1);
68 };
69
74 TString GetChainName(TString file) const;
75 void GuessTrees();
76 std::vector<TString> fTreeNames;
77 TChain* fChain = {nullptr};
78
79 public:
85 InputRootDataInfo(TString file = "data.root", TString treename = "");
91 InputRootDataInfo(std::initializer_list<TString> fileLists, std::initializer_list<TString> treeNames = {});
96 InputRootDataInfo(std::vector<std::vector<TString>> files);
101 TChain* GetChain();
102 virtual void Print(Option_t* option = "") const;
103 ClassDef(InputRootDataInfo, 1)
104 };
105
106
107} /* namespace Hal */
108
109#endif /* HAL_FEATURES_IO_INPUTDATAINFO_H_ */
std::vector< TString > GetSafeFiles(Int_t level) const
InputDataInfo(TString file="data.root")
TString GetSafeFile(Int_t level, Int_t entry) const
InputRootDataInfo(TString file="data.root", TString treename="")