Heavy ion Analysis Libriares
Loading...
Searching...
No Matches
Hal::IOManager Class Referenceabstract
Inheritance diagram for Hal::IOManager:
Hal::RootIOManager HalDbg::IOManager HalOTF::IOManager

Public Member Functions

 IOManager (InputDataInfo *info)
 
virtual Int_t GetEntries () const =0
 
virtual Int_t GetEntry (Int_t i, Int_t flag)=0
 
Bool_t Init ()
 
virtual void SetField (MagField *field)
 
virtual void SetOutput (TString)
 
virtual MagFieldGetField () const
 
void Register (const char *name, const char *folderName, TNamed *obj, Bool_t toFile)
 
void Register (const char *name, const char *Foldername, TCollection *obj, Bool_t toFile)
 
virtual void SetInChain (TChain *tempChain, Int_t ident=-1)=0
 
virtual void UpdateBranches ()
 
BranchInfo::EFlag GetBranchStatus (const char *BrName)
 
virtual TObject * GetObject (const char *BrName)
 
void ActivateBranch (TString brName)
 
TString GetSourceName () const
 
std::vector< TString > GetBranchNameList ()
 
void PrintInfo ()
 
virtual void FillTree ()=0
 
virtual void CloseManager ()
 
virtual TList * GetBranchesList () const
 
Int_t GetNFiles () const
 
std::vector< TString > GetFilesNames (Int_t entry=0) const
 
Int_t GetFriendsLevel () const
 
void AddFile (TString name)
 
void AddFriend (TString friendName, Int_t level)
 
virtual void LockUnusedBranches ()
 
TString GetFirstDataFileName () const
 
TString GetFirstFriendFileName (Int_t level) const
 
std::vector< TString > GetFileNameList (Int_t level) const
 

Protected Member Functions

void AddBranch (TString name, TObject *object, BranchInfo::EFlag flag)
 
BranchInfo FindBranch (TString name) const
 
virtual void RegisterInternal (const char *name, const char *folderName, TNamed *obj, Bool_t toFile)=0
 
virtual void RegisterInternal (const char *name, const char *Foldername, TCollection *obj, Bool_t toFile)=0
 
virtual Bool_t InitInternal ()=0
 

Protected Attributes

InputDataInfofDataInfo = {nullptr}
 
std::vector< Hal::BranchInfofBranches
 

Detailed Description

Definition at line 52 of file IOManager.h.

Constructor & Destructor Documentation

◆ IOManager() [1/2]

Hal::IOManager::IOManager ( )
inline

Definition at line 96 of file IOManager.h.

◆ IOManager() [2/2]

Hal::IOManager::IOManager ( InputDataInfo * info)

IO manager

Parameters
info- information input data

Definition at line 190 of file IOManager.cxx.

◆ ~IOManager()

Hal::IOManager::~IOManager ( )
virtual

Definition at line 137 of file IOManager.cxx.

Member Function Documentation

◆ ActivateBranch()

void Hal::IOManager::ActivateBranch ( TString brName)

set branch mode to active without returing object

Parameters
brName

Definition at line 100 of file IOManager.cxx.

◆ AddBranch()

void Hal::IOManager::AddBranch ( TString name,
TObject * object,
BranchInfo::EFlag flag )
protected

add branch

Parameters
namename of the branch
objectpointer to object
flag

Definition at line 33 of file IOManager.cxx.

◆ AddFile()

void Hal::IOManager::AddFile ( TString name)

add file to list

Parameters
name

Definition at line 200 of file IOManager.cxx.

◆ AddFriend()

void Hal::IOManager::AddFriend ( TString friendName,
Int_t level )

add friend to list of files

Parameters
friendName
level

Definition at line 202 of file IOManager.cxx.

◆ CloseManager()

virtual void Hal::IOManager::CloseManager ( )
inlinevirtual

close manager (close root file, write the tree with data)

Reimplemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

Definition at line 201 of file IOManager.h.

◆ FillTree()

virtual void Hal::IOManager::FillTree ( )
pure virtual

fill tree with data

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ FindBranch()

Hal::BranchInfo Hal::IOManager::FindBranch ( TString name) const
protected

look for branch with given name

Parameters
name
Returns

Definition at line 41 of file IOManager.cxx.

◆ GetBranchesList()

TList * Hal::IOManager::GetBranchesList ( ) const
virtual
Returns
report

Definition at line 141 of file IOManager.cxx.

◆ GetBranchNameList()

std::vector< TString > Hal::IOManager::GetBranchNameList ( )
inline
Returns
list to branches with data

Definition at line 186 of file IOManager.h.

◆ GetBranchStatus()

BranchInfo::EFlag Hal::IOManager::GetBranchStatus ( const char * BrName)

return 1 if branch exists

Parameters
BrName
Returns

Definition at line 68 of file IOManager.cxx.

◆ GetEntries()

virtual Int_t Hal::IOManager::GetEntries ( ) const
pure virtual
Returns
number of entries in data

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ GetEntry()

virtual Int_t Hal::IOManager::GetEntry ( Int_t i,
Int_t flag )
pure virtual

get entry from data

Parameters
ientry number
flagentry flag if 1 get all branches
Returns

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ GetField()

virtual MagField * Hal::IOManager::GetField ( ) const
inlinevirtual

return magnetic field for this data

Returns

Definition at line 133 of file IOManager.h.

◆ GetFileNameList()

std::vector< TString > Hal::IOManager::GetFileNameList ( Int_t level) const
Parameters
levellevel
Returns
return names of files at given level if level==-1 return list of main files

Definition at line 208 of file IOManager.cxx.

◆ GetFilesNames()

std::vector< TString > Hal::IOManager::GetFilesNames ( Int_t entry = 0) const
Parameters
entry
Returns
names of files at given entry (entry is number of file in chain), returns main_tree, friend_1, friend_2 etc.

Definition at line 196 of file IOManager.cxx.

◆ GetFirstDataFileName()

TString Hal::IOManager::GetFirstDataFileName ( ) const
Returns
name of first file with data

Definition at line 204 of file IOManager.cxx.

◆ GetFirstFriendFileName()

TString Hal::IOManager::GetFirstFriendFileName ( Int_t level) const

name of the first friend file

Parameters
level
Returns

Definition at line 206 of file IOManager.cxx.

◆ GetFriendsLevel()

Int_t Hal::IOManager::GetFriendsLevel ( ) const
Returns
number of friens of first file, return -1 if no friends added

Definition at line 198 of file IOManager.cxx.

◆ GetNFiles()

Int_t Hal::IOManager::GetNFiles ( ) const
Returns
number of main files

Definition at line 194 of file IOManager.cxx.

◆ GetObject()

TObject * Hal::IOManager::GetObject ( const char * BrName)
virtual

return object from branch, return nullptr if object /branch does not exist

Parameters
BrName
Returns

Definition at line 77 of file IOManager.cxx.

◆ GetSourceName()

TString Hal::IOManager::GetSourceName ( ) const

return pointer to input root file

Returns

Definition at line 192 of file IOManager.cxx.

◆ Init()

Bool_t Hal::IOManager::Init ( )

initialize this task

Returns

Definition at line 178 of file IOManager.cxx.

◆ LockUnusedBranches()

virtual void Hal::IOManager::LockUnusedBranches ( )
inlinevirtual

set to 0 status of unused branches

Reimplemented in Hal::RootIOManager.

Definition at line 237 of file IOManager.h.

◆ PrintInfo()

void Hal::IOManager::PrintInfo ( )

prints basic information about I/0

Definition at line 121 of file IOManager.cxx.

◆ Register() [1/2]

void Hal::IOManager::Register ( const char * name,
const char * Foldername,
TCollection * obj,
Bool_t toFile )

register data in output file

Parameters
namename of the branch
folderNamename of the directory with branch
objpointer to written object
toFileif true then data will be written to the output

Definition at line 59 of file IOManager.cxx.

◆ Register() [2/2]

void Hal::IOManager::Register ( const char * name,
const char * folderName,
TNamed * obj,
Bool_t toFile )

register data in output file

Parameters
namename of the branch
folderNamename of the directory with branch
objpointer to written object
toFileif true then data will be written to the output

Definition at line 50 of file IOManager.cxx.

◆ RegisterInternal() [1/2]

virtual void Hal::IOManager::RegisterInternal ( const char * name,
const char * Foldername,
TCollection * obj,
Bool_t toFile )
protectedpure virtual

internal function for data registering

Parameters
name
Foldername
obj
toFile

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ RegisterInternal() [2/2]

virtual void Hal::IOManager::RegisterInternal ( const char * name,
const char * folderName,
TNamed * obj,
Bool_t toFile )
protectedpure virtual

Internal function for data registering

Parameters
name
folderName
obj
toFile

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ SetField()

virtual void Hal::IOManager::SetField ( MagField * field)
inlinevirtual

set magnetic field

Parameters
field

Definition at line 123 of file IOManager.h.

◆ SetInChain()

virtual void Hal::IOManager::SetInChain ( TChain * tempChain,
Int_t ident = -1 )
pure virtual

not used

Parameters
tempChain
ident

Implemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

◆ SetOutput()

virtual void Hal::IOManager::SetOutput ( TString )
inlinevirtual

set name of the output file

Parameters
name

Reimplemented in Hal::RootIOManager, HalDbg::IOManager, and HalOTF::IOManager.

Definition at line 128 of file IOManager.h.

◆ UpdateBranches()

virtual void Hal::IOManager::UpdateBranches ( )
inlinevirtual

not used

Reimplemented in Hal::RootIOManager.

Definition at line 159 of file IOManager.h.

Member Data Documentation

◆ fBranches

std::vector<Hal::BranchInfo> Hal::IOManager::fBranches
protected

list of branches

Definition at line 63 of file IOManager.h.

◆ fDataInfo

InputDataInfo* Hal::IOManager::fDataInfo = {nullptr}
protected

Definition at line 59 of file IOManager.h.


The documentation for this class was generated from the following files: