1 // $Id: AddTaskEMCALPi0V2.C 56081 2012-05-01 08:57:08Z loizides $
3 AliAnalysisTask *AddTaskEMCALPi0V2()
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskEMCALPi0V2", "No analysis manager to connect to.");
13 if (!mgr->GetInputEventHandler()) {
14 ::Error("AddTaskEMCALPi0V2", "This task requires an input event handler");
18 // Create the task and configure it.
19 //===========================================================================
20 AliAnalysisTaskPi0V2* ana = new AliAnalysisTaskPi0V2("Pi0v2Task");
24 // Create ONLY the output containers for the data produced by the task.
25 // Get and connect other common input/output containers via the manager as below
26 //==============================================================================
27 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosEMCALP0v2",
28 TList::Class(),AliAnalysisManager::kOutputContainer,
29 Form("%s_v2task", AliAnalysisManager::GetCommonFileName()));
31 mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer());
32 mgr->ConnectOutput (ana, 1, coutput1 );