]>
Commit | Line | Data |
---|---|---|
1986f153 | 1 | AliCentralitySelectionTask *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 | } |