AliPhysics  251aa1e (251aa1e)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AddTaskSelectHF.C
Go to the documentation of this file.
2 {
3  //
4  // Test macro for the AliAnalysisTaskSE for heavy-flavour selection
5  // and creation of a stand-alone AOD
6  // A.Dainese, andrea.dainese@lnl.infn.it
7  //
8 
9  // Get the pointer to the existing analysis manager via the static access method.
10  //==============================================================================
11  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
12  if (!mgr) {
13  ::Error("AddTaskSelectHF", "No analysis manager to connect to.");
14  return NULL;
15  }
16 
17 
18  // Output
19  AliAODHandler *aodHandler = new AliAODHandler();
20  aodHandler->SetOutputFileName("AliAOD.VertexingHF.sa.root");
21  aodHandler->SetCreateNonStandardAOD();
22  mgr->SetOutputEventHandler(aodHandler);
23 
24 
25  // Aanalysis task
26  AliAnalysisTaskSESelectHF *hfTask = new AliAnalysisTaskSESelectHF("SelectHFAnalysis");
27  hfTask->SetDebugLevel(2);
28  mgr->AddTask(hfTask);
29 
30  //
31  // Create containers for input/output
32  mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
33  mgr->ConnectOutput(hfTask,0,mgr->GetCommonOutputContainer());
34 
35  return hfTask;
36 }
AliAnalysisTaskSESelectHF * AddTaskSelectHF()