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