end-of-line normalization
[u/mrichter/AliRoot.git] / PWGHF / vertexingHF / macros / AddTaskCompareHF.C
CommitLineData
a65a7e70 1AliAnalysisTaskSECompareHF *AddTaskCompareHF()
2{
3 //
4 // Test macro for the AliAnalysisTaskSE for heavy-flavour candidates
5 // association with MC truth (using MC info in AOD)
6 // A.Dainese, andrea.dainese@lnl.infn.it
7 //
8
9
10 // Get the pointer to the existing analysis manager via the static access method.
11 //==============================================================================
12 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
13 if (!mgr) {
14 ::Error("AddTaskCompareHF", "No analysis manager to connect to.");
15 return NULL;
16 }
17
18
19 // Aanalysis task
20 AliAnalysisTaskSECompareHF *hfTask = new AliAnalysisTaskSECompareHF("CompareHFAnalysis");
21 hfTask->SetDebugLevel(0);
22 mgr->AddTask(hfTask);
23
24 //
25 // Create containers for input/output
26 AliAnalysisDataContainer *cinputCmp = mgr->CreateContainer("cinput",TChain::Class(),
27 AliAnalysisManager::kInputContainer);
28 AliAnalysisDataContainer *coutputCmp1 = mgr->CreateContainer("coutputCmp1",TList::Class(),
29 AliAnalysisManager::kOutputContainer,
30 "CmpHF.root");
31 AliAnalysisDataContainer *coutputCmp2 = mgr->CreateContainer("coutputCmp2",TNtuple::Class(),
32 AliAnalysisManager::kOutputContainer,
33 "CmpHFnt.root");
34 coutputCmp2->SetSpecialOutput();
35
36 mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
37
38 mgr->ConnectOutput(hfTask,1,coutputCmp1);
39 mgr->ConnectOutput(hfTask,2,coutputCmp2);
40
41 return hfTask;
42}