Corrected protection.
[u/mrichter/AliRoot.git] / STEER / AliObjectLoader.cxx
CommitLineData
a9bbb414 1/////////////////////////////////////////////////////////////////////////////////////////////
2// //
3// class AliObjectLoader //
4// //
5// Container of all data needed for full //
6// description of each data type //
7// (Hits, Kine, ...) //
8// //
9// Each data loader has a basic standard setup of BaseLoaders //
10// which can be identuified by indexes (defined by EStdBasicLoaders) //
11// Data managed by these standard base loaders has fixed naming convention //
12// e.g. - tree with hits is always named TreeH //
13// (defined in AliLoader::fgkDefaultHitsContainerName) //
14// - task DtectorName+Name defined //
15// //
16// EStdBasicLoaders idx Object Type Description //
17// kData 0 TTree or TObject main data itself (hits,digits,...) //
18// kTask 1 TTask object producing main data //
19// kQA 2 TTree quality assurance tree //
20// kQATask 3 TTask task producing QA object //
21// //
22// //
23// User can define and add more basic loaders even Run Time. //
24// Caution: in order to save information about added base loader //
25// user must rewrite Run Loader to galice.file, overwriting old setup //
26// //
27/////////////////////////////////////////////////////////////////////////////////////////////
28
29#include "AliLog.h"
30#include "AliObjectLoader.h"
31#include "AliRunLoader.h"
32
33ClassImp(AliObjectLoader)
34
35//______________________________________________________________________________
36AliObjectLoader::AliObjectLoader(const TString& name, AliDataLoader* dl, Bool_t storeontop):
37 AliBaseLoader(name,dl,storeontop)
38{
39 //
40 // Constructor
41 //
42}
43
44//______________________________________________________________________________
45TFolder* AliObjectLoader::GetFolder() const
46{
47 //
48 // Returns pointer to the object folder
49 //
50 TFolder* df = GetDataLoader()->GetFolder();
51 if (df == 0x0)
52 {
53 AliFatal("Data Folder is NULL");
54 }
55 return df;
56}
57
58//______________________________________________________________________________
a9bbb414 59void AliObjectLoader::RemoveFromBoard(TObject* obj)
60{
61 //
62 // Removes "obj" from the board
63 //
64 GetFolder()->Remove(obj);
65}
66
67//______________________________________________________________________________
68Int_t AliObjectLoader::AddToBoard(TObject* obj)
69{
70 //
71 // Adds "obj" to the board
72 //
73 GetFolder()->Add(obj);
74 return 0;
75}
76
77//______________________________________________________________________________
78TObject* AliObjectLoader::Get() const
79{
80 //
81 // Returns pointer to the object loader
82 //
83 return (GetFolder()) ? GetFolder()->FindObject(GetName()) : 0x0;
84}
85
86
87