]>
Commit | Line | Data |
---|---|---|
3310f801 | 1 | AliAnalysisTaskUnicor *AddTaskUnicor() |
2 | { | |
3 | // Creates a unicor analysis task and adds it to the analysis manager | |
4 | ||
5 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
6 | if (!mgr) {Error("AddTaskUnicor", "no analysis manager"); return NULL;} | |
7 | if (!mgr->GetInputEventHandler()) {Error("AddTaskUnicor", "no input event handler"); return NULL;} | |
8 | TString type = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD" | |
9 | if (type!="ESD") {Error("AddTaskUnicor","handler not of ESD type"); return NULL;} | |
10 | AliAnalysisTaskUnicor *mytask = new AliAnalysisTaskUnicor(); | |
11 | mgr->AddTask(mytask); | |
12 | mgr->ConnectInput (mytask,0,mgr->GetCommonInputContainer()); | |
13 | AliAnalysisDataContainer *coutpt = mgr->CreateContainer("unilis", TList::Class(), | |
14 | AliAnalysisManager::kOutputContainer, | |
15 | "unicor-result-as-list.root"); | |
16 | mgr->ConnectOutput(mytask,1,coutpt); | |
17 | return mytask; | |
18 | } |