move macros to macros/
[u/mrichter/AliRoot.git] / PWG3 / vertexingHF / AddTaskBkgLikeSignJPSI.C
1 AliAnalysisTaskSEBkgLikeSignJPSI *AddTaskBkgLikeSignJPSI() 
2 {
3   //
4   // Test macro for the AliAnalysisTaskSEBkgLikeSignJPSI
5   // starting from AliAOD.root file with HF + Like Sign candidates.
6   // C.Di Giglio, carmelo.digiglio@ba.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("AddTaskBkgLikeSignJPSI", "No analysis manager to connect to.");
15     return NULL;
16   }   
17
18
19   // Like-sign background analysis task    
20   AliAnalysisTaskSEBkgLikeSignJPSI *lsTask = new AliAnalysisTaskSEBkgLikeSignJPSI("CmpLikeSignAnalysis");
21   lsTask->SetDebugLevel(0);
22
23   mgr->AddTask(lsTask);
24
25   //
26   // Create containers for input/output
27   AliAnalysisDataContainer *cinputLS = mgr->CreateContainer("cinputLikeSignJPSI",TChain::Class(), 
28                                                           AliAnalysisManager::kInputContainer);
29   TString outputfile = AliAnalysisManager::GetCommonFileName();
30   outputfile += ":PWG3_D2H_CmpLikesignJPSI";
31   AliAnalysisDataContainer *coutputLS = mgr->CreateContainer("coutputLikeSignJPSI",TList::Class(),
32                                                            AliAnalysisManager::kOutputContainer,
33                                                              outputfile.Data());
34
35   mgr->ConnectInput(lsTask,0,mgr->GetCommonInputContainer());
36   mgr->ConnectOutput(lsTask,1,coutputLS);
37
38
39   return lsTask;
40 }