]>
Commit | Line | Data |
---|---|---|
bbb57828 | 1 | AliMeanVertexCalibTask *AddTaskMeanVertexCalib(){ |
2 | // | |
3 | //AddTask for MeanVertex Task to run with pass0 | |
4 | //Author: D.Caffarri davide.caffarri@pd.infn.it | |
5 | // | |
6 | ||
7 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
8 | if (!mgr) { | |
9 | ::Error("AddTaskMeanVertex", "No analysis manager to connect to."); | |
10 | return NULL; | |
11 | } | |
12 | ||
13 | ||
14 | if (!mgr->GetInputEventHandler()) { | |
15 | ::Error("AddTaskMeanVertex", "This task requires an input event handler"); | |
16 | return NULL; | |
17 | } | |
18 | ||
19 | ||
20 | AliMeanVertexCalibTask *meanVertexTask = new AliMeanVertexCalibTask("AliMeanVertexCalibTask"); | |
21 | ||
22 | AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer(); | |
23 | if (!cinput1) cinput1 = mgr->CreateContainer("cchain",TChain::Class(), AliAnalysisManager::kInputContainer); | |
24 | ||
25 | ||
26 | AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("MeanVertexCalib", TList::Class(),AliAnalysisManager::kOutputContainer, "AliESDfriends_v1.root"); | |
27 | ||
28 | mgr->ConnectInput(meanVertexTask,0,cinput1); | |
29 | mgr->ConnectOutput(meanVertexTask,1,coutput1); | |
30 | ||
31 | return meanVertexTask; | |
32 | ||
33 | } |