]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/macros/AddTaskCentralitySelection.C
Adding the possibility to read additional tracks or MC information to the AOD momentu...
[u/mrichter/AliRoot.git] / PWG4 / macros / AddTaskCentralitySelection.C
CommitLineData
1986f153 1AliCentralitySelectionTask *AddTaskCentralitySelection(const char* percentilefile1, const char* percentilefile2){
2
3
4 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5 if(!mgr){
6 ::Error("AddTaskCentralitySelection", "No analysis manager to connect ot.");
7 return NULL;
8 }
9 if(!mgr->GetInputEventHandler()){
10 ::Error("AddTaskCentralitySelection", "This task requires an input event handler.");
11 return NULL;
12 }
13
14
15 AliCentralitySelectionTask *task = new AliCentralitySelectionTask("CentralitySelection");
16
17 if(percentilefile1) task->SetPercentileFile(percentilefile1);
18 if(percentilefile2) task->SetPercentileFile2(percentilefile2);
19
20 mgr->AddTask(task);
21
22 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer());
23
24 return task;
25}