Splitting loader class to have proper debug messages
[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//______________________________________________________________________________
59AliObjectLoader::AliObjectLoader(const AliObjectLoader& source):
60 AliBaseLoader(source) {
61 //
62 // copy constructor
63 //
64 AliFatal("Copy constructor not implemented");
65}
66
67//______________________________________________________________________________
68AliObjectLoader& AliObjectLoader::operator=(const AliObjectLoader& /*source*/)
69{
70 //
71 // Assignment operator
72 //
73 AliFatal("Assignment operator not implemented");
74 return *this;
75}
76
77//______________________________________________________________________________
78void AliObjectLoader::RemoveFromBoard(TObject* obj)
79{
80 //
81 // Removes "obj" from the board
82 //
83 GetFolder()->Remove(obj);
84}
85
86//______________________________________________________________________________
87Int_t AliObjectLoader::AddToBoard(TObject* obj)
88{
89 //
90 // Adds "obj" to the board
91 //
92 GetFolder()->Add(obj);
93 return 0;
94}
95
96//______________________________________________________________________________
97TObject* AliObjectLoader::Get() const
98{
99 //
100 // Returns pointer to the object loader
101 //
102 return (GetFolder()) ? GetFolder()->FindObject(GetName()) : 0x0;
103}
104
105
106