New task for Ds->KKpi analysis (Francesco)
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AddTaskDs.C
CommitLineData
25c94fc8 1AliAnalysisTaskSEDs *AddTaskDs()
2{
3 //
4 // Test macro for the AliAnalysisTaskSE for Ds candidates
5
6
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
8 if (!mgr) {
9 ::Error("AddTaskDs", "No analysis manager to connect to.");
10 return NULL;
11 }
12
13
14 // Aanalysis task
15 AliAnalysisTaskSEDs *dsTask = new AliAnalysisTaskSEDs("DsAnalysis");
16 dsTask->SetReadMC(kTRUE);
17 dsTask->SetDebugLevel(0);
18 mgr->AddTask(dsTask);
19
20 //
21 // Create containers for input/output
22 AliAnalysisDataContainer *cinputDs = mgr->CreateContainer("cinputDs",TChain::Class(),
23 AliAnalysisManager::kInputContainer);
24
25 TString outputfile = AliAnalysisManager::GetCommonFileName();
26 outputfile += ":PWG3_D2H_InvMassDs";
27 AliAnalysisDataContainer *coutputDs = mgr->CreateContainer("coutputDs",TList::Class(),
28 AliAnalysisManager::kOutputContainer,
29 outputfile.Data());
30
31 mgr->ConnectInput(dsTask,0,mgr->GetCommonInputContainer());
32
33 mgr->ConnectOutput(dsTask,1,coutputDs);
34
35 return dsTask;
36}