2 /////////////////////////////////////////////////////////////////////////////////////////////
4 // class AliTaskLoader //
6 // Container of all data needed for full //
7 // description of each data type //
8 // (Hits, Kine, ...) //
10 // Each data loader has a basic standard setup of BaseLoaders //
11 // which can be identuified by indexes (defined by EStdBasicLoaders) //
12 // Data managed by these standard base loaders has fixed naming convention //
13 // e.g. - tree with hits is always named TreeH //
14 // (defined in AliLoader::fgkDefaultHitsContainerName) //
15 // - task DtectorName+Name defined //
17 // EStdBasicLoaders idx Object Type Description //
18 // kData 0 TTree or TObject main data itself (hits,digits,...) //
19 // kTask 1 TTask object producing main data //
20 // kQA 2 TTree quality assurance tree //
21 // kQATask 3 TTask task producing QA object //
24 // User can define and add more basic loaders even Run Time. //
25 // Caution: in order to save information about added base loader //
26 // user must rewrite Run Loader to galice.file, overwriting old setup //
28 /////////////////////////////////////////////////////////////////////////////////////////////
33 #include "AliRunLoader.h"
34 #include "AliTaskLoader.h"
36 ClassImp(AliTaskLoader)
38 //______________________________________________________________________________
39 AliTaskLoader::AliTaskLoader(const TString& name, AliDataLoader* dl,
40 TTask* parentaltask, Bool_t storeontop):
41 AliBaseLoader(name,dl,storeontop),
42 fParentalTask(parentaltask)
49 //______________________________________________________________________________
50 AliTaskLoader::AliTaskLoader(const AliTaskLoader& source):
51 AliBaseLoader(source),
52 fParentalTask(source.fParentalTask)
57 AliFatal("Copy constructor not implemented");
60 //______________________________________________________________________________
61 AliTaskLoader& AliTaskLoader::operator=(const AliTaskLoader& /*source*/)
64 // Assignment operator
66 AliFatal("Assignment operator not implemented");
70 //______________________________________________________________________________
71 void AliTaskLoader::Clean()
74 // Removes tasl from parental task
75 // DO NOT DELETE OBJECT contrary to BaseLoader
77 AliDebug(1, Form("Clean","%s %s",GetName(),GetDataLoader()->GetName()));
81 AliDebug(1, Form("cleaning %s.",GetName()));
87 //______________________________________________________________________________
88 void AliTaskLoader::RemoveFromBoard(TObject* obj)
91 // Removes the task "obj" from the board
93 GetParentalTask()->GetListOfTasks()->Remove(obj);
96 //______________________________________________________________________________
97 Int_t AliTaskLoader::AddToBoard(TObject* obj)
100 // Adds task "obj" to the board
102 TTask* task = dynamic_cast<TTask*>(obj);
105 AliError("To TTask board can be added only tasks.");
108 GetParentalTask()->Add(task);
112 //______________________________________________________________________________
113 TObject* AliTaskLoader::Get() const
116 // Returns pointer to the current task
118 return (GetParentalTask()) ? GetParentalTask()->GetListOfTasks()->FindObject(GetName()) : 0x0;
121 //______________________________________________________________________________
122 TTask* AliTaskLoader::GetParentalTask() const
125 // Returns parental tasks for this task
127 return fParentalTask;