]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGCF/FEMTOSCOPY/UNICOR/AddTaskUnicor.C
UNICOR becomes part of FEMTOSCOPY
[u/mrichter/AliRoot.git] / PWGCF / FEMTOSCOPY / UNICOR / AddTaskUnicor.C
CommitLineData
3310f801 1AliAnalysisTaskUnicor *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());
360f2169 13 TString outputfile = AliAnalysisManager::GetCommonFileName();
14 outputfile += ":PWG2UNICOR";
3310f801 15 AliAnalysisDataContainer *coutpt = mgr->CreateContainer("unilis", TList::Class(),
360f2169 16 AliAnalysisManager::kOutputContainer,
17 outputfile);
3310f801 18 mgr->ConnectOutput(mytask,1,coutpt);
19 return mytask;
20}