1 AliAnalysisTaskPHOSPi0CalibSelection *AddTaskPHOSPi0Calib()
3 // Creates a PartCorr task, configures it and adds it to the analysis manager.
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
9 ::Error("AddTaskPartCorr", "No analysis manager to connect to.");
13 // Check the analysis type using the event handlers connected to the analysis manager.
14 //==============================================================================
15 if (!mgr->GetInputEventHandler()) {
16 ::Error("AddTaskPartCorr", "This task requires an input event handler");
20 //TString dataType = mgr->GetInputEventHandler()->GetDataType(); // can be "ESD" or "AOD"
22 //===========================================================================
25 //===========================================================================
27 AliAnalysisTaskPHOSPi0CalibSelection * pi0calib = new AliAnalysisTaskPHOSPi0CalibSelection ("PHOSPi0Calibration");
28 mgr->AddTask(pi0calib);
31 // Create ONLY the output containers for the data produced by the task.
32 // Get and connect other common input/output containers via the manager as below
33 //==============================================================================
35 AliAnalysisDataContainer *coutput =
36 mgr->CreateContainer("PHOSPi0Calib", TList::Class(), AliAnalysisManager::kOutputContainer, "PHOSPi0Calib.root");
38 mgr->ConnectInput (pi0calib, 0, mgr->GetCommonInputContainer());
39 mgr->ConnectOutput (pi0calib, 1, coutput);