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 void AliTaskLoader::Clean()
53 // Removes tasl from parental task
54 // DO NOT DELETE OBJECT contrary to BaseLoader
56 AliDebug(1, Form("Clean","%s %s",GetName(),GetDataLoader()->GetName()));
60 AliDebug(1, Form("cleaning %s.",GetName()));
66 //______________________________________________________________________________
67 void AliTaskLoader::RemoveFromBoard(TObject* obj)
70 // Removes the task "obj" from the board
72 GetParentalTask()->GetListOfTasks()->Remove(obj);
75 //______________________________________________________________________________
76 Int_t AliTaskLoader::AddToBoard(TObject* obj)
79 // Adds task "obj" to the board
81 TTask* task = dynamic_cast<TTask*>(obj);
84 AliError("To TTask board can be added only tasks.");
87 GetParentalTask()->Add(task);
91 //______________________________________________________________________________
92 TObject* AliTaskLoader::Get() const
95 // Returns pointer to the current task
97 return (GetParentalTask()) ? GetParentalTask()->GetListOfTasks()->FindObject(GetName()) : 0x0;
100 //______________________________________________________________________________
101 TTask* AliTaskLoader::GetParentalTask() const
104 // Returns parental tasks for this task
106 return fParentalTask;