ROOT logo
AliRoot » STEER » STEER » AliDataLoader

class AliDataLoader: public TNamed


class AliDataLoader

Container of all data needed for full
description of each data type
(Hits, Kine, ...)

Each data loader has a basic standard setup of BaseLoaders
which can be identuified by indexes (defined by EStdBasicLoaders)
Data managed by these standard base loaders has fixed naming convention
e.g. - tree with hits is always named TreeH
(defined in AliLoader::fgkDefaultHitsContainerName)

EStdBasicLoaders   idx     Object Type        Description
kData           0    TTree or TObject     main data itself (hits,digits,...)


User can define and add more basic loaders even Run Time.
Caution: in order to save information about added base loader
user must rewrite Run Loader to galice.file, overwriting old setup


Function Members (Methods)

public:
AliDataLoader()
AliDataLoader(const char* filename, const char* contname, const char* name, Option_t* opt = "t")
virtual~AliDataLoader()
voidTObject::AbstractMethod(const char* method) const
voidAddBaseLoader(AliBaseLoader* bl)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
Bool_tCd()
Bool_tCheckReload()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClean()
voidCleanAll()
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual voidCloseFile()
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
AliObjectLoader*GetBaseDataLoader()
AliBaseLoader*GetBaseLoader(const TString& name) const
AliBaseLoader*GetBaseLoader(Int_t n) const
const Int_t&GetCompressionLevel() const
TDirectory*GetDirectory() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Int_tGetEvent()
TFolder*GetEventFolder()
TFile*GetFile() const
const TString&GetFileName() const
const TString&GetFileOption() const
TFolder*GetFolder() const
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
Bool_tIsFileOpen() const
Bool_tIsFileWritable() const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
Bool_tIsOptionContrary(const TString& option) const
virtual Bool_tTNamed::IsSortable() const
Bool_tTObject::IsZombie() const
virtual Int_tLoad(Option_t* opt = "")
virtual voidTNamed::ls(Option_t* option = "") const
virtual voidMakeTree()
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
virtual Int_tOpenFile(Option_t* opt)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Int_tReload()
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidSetBaseDataLoader(AliBaseLoader* bl)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetCompressionLevel(Int_t cl)
voidSetDirName(TString& dirname)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual Int_tSetEvent()
Int_tSetEventFolder(TFolder* eventfolder)
virtual voidSetFileName(const TString& filename)
voidSetFileNameSuffix(const TString& suffix)
const TStringSetFileOffset(const TString& fname)
virtual voidSetFileOption(Option_t* fileopt)
Int_tSetFolder(TFolder* folder)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNumberOfEventsPerFile(Int_t nevpf)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
voidSynchronize()
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual TTree*Tree() const
virtual voidUnload()
voidUnloadAll()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual Int_tWriteData(Option_t* opt = "")
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
AliRunLoader*GetRunLoader()
voidTObject::MakeZombie()

Data Members

public:
enum EStdBasicLoaders { kData
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
private:
TObjArray*fBaseLoadersbase loaders
Int_tfCompressionLevelCompression Level of File
TDirectory*fDirectory!pointer to TDirectory
TFolder*fEventFolder!event folder
TFile*fFile! pointer to file
TStringfFileNamename of the file
TStringfFileOption!file option while opened
TFolder*fFolder! folder with data
Int_tfNEventsPerFiledefines number of events stored per one file

Class Charts

Inheritance Chart:
TNamed
AliDataLoader

Function documentation

AliDataLoader()
AliDataLoader(const char* filename, const char* contname, const char* name, Option_t* opt = "t")
constructor
 creates a 0 loader, depending on option, default "T" is specialized loader for trees
 else standard object loader
 trees needs special care, becouse we need to set dir before writing
~AliDataLoader()
dtor

Int_t SetEvent()
 The same that GetEvent but do not post data to folders

Int_t GetEvent()
 posts all loaded data from files to White Board
 event number is defined in RunLoader

returns:
     0  - in case of no error
     1  - event not found

for each base laoder post, if was loaded before GetEvent
Int_t OpenFile(Option_t* opt)
Opens file named 'filename', and assigns pointer to it to 'file'
jumps to fDirectoryectory corresponding to current event and stores the pointer to it in 'fDirectory'
option 'opt' is passed to TFile::Open
void Unload()
unloads main data -  shortcut method

void UnloadAll()
 Unloads all data

Int_t Reload()
 Unloads and loads data again

Int_t WriteData(Option_t* opt = "")
 Writes primary data ==  first BaseLoader

Int_t Load(Option_t* opt = "")
 Writes primary data ==  first BaseLoader

Int_t SetEventFolder(TFolder* eventfolder)
 Sets the event folder

Int_t SetFolder(TFolder* folder)
 Sets the folder and the data loaders
TFolder* GetEventFolder()
 Get EVENT folder
 Data that are changing from event to event, even in single run

AliRunLoader* GetRunLoader()
 Gets the run-loader from event folder

void CloseFile()
 Closes file

void Clean()
 Cleans main data

void CleanAll()
 Cleans all folders

void SetFileNameSuffix(const TString& suffix)
 adds the suffix before ".root",
 e.g. TPC.Digits.root -> TPC.DigitsMerged.root
 made on Jiri Chudoba demand

Bool_t CheckReload()
 Checks if we have to reload given file

const TString SetFileOffset(const TString& fname)
 Return fname

void SetFileOption(Option_t* fileopt)
 Sets file option

void SetCompressionLevel(Int_t cl)
 Sets comression level for data defined by di

void MakeTree()
 Makes tree for the current data loader

Bool_t IsFileWritable() const
 Returns true if file is writable

Bool_t IsFileOpen() const
 Returns true if file is writable

Bool_t IsOptionContrary(const TString& option) const
 Checks if passed option is contrary with file open option
 which is passed option "writable" and existing option not wriable
 in reverse case it is no harm so it is NOT contrary
void AddBaseLoader(AliBaseLoader* bl)
Adds a base loader to lits of base loaders managed by this data loader
Managed data will be stored in proper root directory,
and posted to
 - in case of tree/object - data folder connected with detector associated with this data loader
AliBaseLoader* GetBaseLoader(const TString& name) const
 Return pointer to base loader

AliBaseLoader* GetBaseLoader(Int_t n) const
 Gets the n-th base loader (what is n?)

TTree* Tree() const
 Returns tree from the main base loader
 it is just shortcut method for comfort of user
 main storage object does not have to be Tree  -
 that is why first we need to check if it is a TreeLoader
void SetDirName(TString& dirname)
 Sets the directory name where the files will be stored

AliObjectLoader* GetBaseDataLoader()
 Gets the base data loader

void SetBaseDataLoader(AliBaseLoader* bl)
 Sets data base loader

void Synchronize()
 Synchronizes all writable files

AliDataLoader()
const TString& GetFileName() const
{return fFileName;}
TFile* GetFile() const
{return fFile;}
TDirectory* GetDirectory() const
{return fDirectory;}
const TString& GetFileOption() const
{return fFileOption;}
const Int_t& GetCompressionLevel() const
Bool_t Cd()
{return (fDirectory)?fDirectory->cd():kFALSE;}
void SetFileName(const TString& filename)
{fFileName = filename;}
TFolder* GetFolder() const
{return fFolder;}
void SetNumberOfEventsPerFile(Int_t nevpf)
e.g. TPC.Digits.root -> TPC.DigitsMerged.root
made on Jiri Chudoba demand
{fNEventsPerFile = nevpf;}
AliDataLoader& operator=(const AliDataLoader& )