AliPhysics  58f3d52 (58f3d52)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskCharmBaryonsMC.C
Go to the documentation of this file.
2 {
3 
4  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
5  if (!mgr) {
6  ::Error("AddTaskCharmBaryonMC", "No analysis manager to connect to.");
7  return NULL;
8  }
9 
10 
11  //CREATE THE TASK
12 
13  printf("CREATE TASK\n");
14  AliAnalysisTaskCharmBaryonsMC *task = new AliAnalysisTaskCharmBaryonsMC("TaskCharmBaryonsMC");
15  mgr->AddTask(task);
16 
17  // Create and connect containers for input/output
18  mgr->ConnectInput(task,0,mgr->GetCommonInputContainer());
19  AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
20  mgr->ConnectInput(task, 0, cinput);
21 
22  TString outputfile = AliAnalysisManager::GetCommonFileName();
23  AliAnalysisDataContainer *coutput1 = mgr->CreateContainer(Form("CharmBaryonHistoMC"),TList::Class(),AliAnalysisManager::kOutputContainer,outputfile.Data()); // general histos
24  mgr->ConnectOutput(task,1,coutput1);
25  return task;
26 
27 }
AliAnalysisTaskCharmBaryonsMC * AddTaskCharmBaryonsMC()