9#ifndef HAL_FEATURES_IO_STEER_IOMANAGER_H_
10#define HAL_FEATURES_IO_STEER_IOMANAGER_H_
31 enum class EFlag { kInActive, kInPassive, kOut, kVirtual, kNull };
34 TString fBrName = {
""};
35 TObject* fPointer = {
nullptr};
36 EFlag fFlag = {EFlag::kNull};
39 BranchInfo(TString name =
"", TObject* pointer =
nullptr, EFlag used = EFlag::kNull) :
40 fBrName(name), fPointer(pointer), fFlag(used) {}
41 BranchInfo(
const BranchInfo& other) : TObject(other), fBrName(other.fBrName), fPointer(other.fPointer), fFlag(other.fFlag) {}
42 EFlag GetFlag()
const {
return fFlag; }
43 TString GetBranchName()
const {
return fBrName; }
44 void SetFlag(EFlag Flag = EFlag::kNull) { fFlag = Flag; }
45 void SetBranchName(
const TString name) { fBrName = name; }
46 TObject* GetPointer()
const {
return fPointer; }
47 void SetPointer(TObject* pointer =
nullptr) { fPointer = pointer; }
56 std::vector<TString> fBranchNameList;
70 void AddBranch(TString name, TObject*
object, BranchInfo::EFlag flag);
84 virtual void RegisterInternal(
const char* name,
const char* folderName, TNamed* obj, Bool_t toFile) = 0;
92 virtual void RegisterInternal(
const char* name,
const char* Foldername, TCollection* obj, Bool_t toFile) = 0;
93 virtual Bool_t InitInternal() = 0;
96 IOManager() : fField(nullptr), fBranchNameList() {};
141 void Register(
const char* name,
const char* folderName, TNamed* obj, Bool_t toFile);
149 void Register(
const char* name,
const char* Foldername, TCollection* obj, Bool_t toFile);
155 virtual void SetInChain(TChain* tempChain, Int_t ident = -1) = 0;
171 virtual TObject*
GetObject(
const char* BrName);
188 return fBranchNameList;
233 void AddFriend(TString friendName, Int_t level);
Int_t GetFriendsLevel() const
virtual TList * GetBranchesList() const
virtual void UpdateBranches()
virtual void CloseManager()
virtual void LockUnusedBranches()
virtual void SetInChain(TChain *tempChain, Int_t ident=-1)=0
virtual void RegisterInternal(const char *name, const char *Foldername, TCollection *obj, Bool_t toFile)=0
BranchInfo::EFlag GetBranchStatus(const char *BrName)
virtual Int_t GetEntries() const =0
void ActivateBranch(TString brName)
std::vector< TString > GetFileNameList(Int_t level) const
TString GetFirstDataFileName() const
std::vector< TString > GetBranchNameList()
virtual void SetOutput(TString)
virtual Int_t GetEntry(Int_t i, Int_t flag)=0
std::vector< TString > GetFilesNames(Int_t entry=0) const
virtual MagField * GetField() const
virtual void SetField(MagField *field)
void AddFriend(TString friendName, Int_t level)
std::vector< Hal::BranchInfo > fBranches
BranchInfo FindBranch(TString name) const
void Register(const char *name, const char *folderName, TNamed *obj, Bool_t toFile)
void AddFile(TString name)
TString GetSourceName() const
void AddBranch(TString name, TObject *object, BranchInfo::EFlag flag)
TString GetFirstFriendFileName(Int_t level) const
virtual void FillTree()=0
virtual TObject * GetObject(const char *BrName)
virtual void RegisterInternal(const char *name, const char *folderName, TNamed *obj, Bool_t toFile)=0