1 AliAnalysisTaskCaloConv * AddTaskCaloConv(){
2 //Macro to add class CaloConv (conversion+calorimeters pi0 analysis) to train
3 //Argument is the path to the PHOS recalibration parameters (file with OCDB entry)
4 //Default path to the file with unit recalibration == no recalibnration
5 //If file does not exist, no recalibration histograms will be filled
7 // Get the pointer to the existing analysis manager via the static access method.
8 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
10 ::Error("AddTaskCaloConv", "No analysis manager to connect to.");
14 // Check the analysis type using the event handlers connected to the analysis manager.
15 if (!mgr->GetInputEventHandler()) {
16 ::Error("AddTaskCaloConv", "This task requires an input event handler");
21 AliAnalysisTaskCaloConv *task = new AliAnalysisTaskCaloConv("CaloConv");
24 // Create containers for input/output
25 AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
26 mgr->ConnectInput(task, 0, cinput);
28 TString outputfile = AliAnalysisManager::GetCommonFileName();
29 AliAnalysisDataContainer *coutput = mgr->CreateContainer("CaloConv", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PWG4_CaloConv",outputfile.Data()));
30 mgr->ConnectOutput(task, 1, coutput);
31 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("CFCaloConv", TList::Class(), AliAnalysisManager::kOutputContainer, Form("%s:PWG4_CFCaloConv",outputfile.Data()));
32 mgr->ConnectOutput(task, 2, coutput2);