]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - PWGLF/SPECTRA/XtAnalysis/macros/AddTaskXtAnalysis.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / XtAnalysis / macros / AddTaskXtAnalysis.C
... / ...
CommitLineData
1AliAnalysisTask *AddTaskXtAnalysis() {
2
3 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
4 if (!mgr) {
5 ::Error("AddTaskFluctuations", "No analysis manager to connect to.");
6 return NULL;
7 }
8
9 if (!mgr->GetInputEventHandler()) {
10 ::Error("AddTaskFluctuations", "This task requires an input event handler");
11 return NULL;
12 }
13
14 TString type = mgr->GetInputEventHandler()->GetDataType();
15
16 // parameter provides the location of the input card
17 AliXtAnalysis *xtTask = new AliXtAnalysis("AliXtAnalysis",Form("%s%s",gSystem->Getenv("ALICE_ROOT"),"/PWGLF/SPECTRA/XtAnalysis/card_xT.input"));
18 xtTask->SetDebugLevel(0);
19 xtTask->SetDebugMode(0);
20
21 mgr->AddTask((AliAnalysisTask*) xtTask);
22
23 // Create containers for input/output
24 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
25
26 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("xtAnalysis", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:xtAnalysis",AliAnalysisManager::GetCommonFileName()));
27 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("xtHistos", TDirectory::Class(), AliAnalysisManager::kOutputContainer, Form("%s:xtHistos",AliAnalysisManager::GetCommonFileName()));
28 // Connect input/output
29 mgr->ConnectInput(xtTask, 0, cinput);
30 mgr->ConnectOutput(xtTask, 1, coutput1);
31 mgr->ConnectOutput(xtTask, 2, coutput2);
32
33 return xtTask;
34}
35