1 AliAnalysisTaskEmcalBadCells *AddTaskEmcalBadCells(
2 const char *CentEst = "V0A",
3 Int_t pSel = AliVEvent::kINT7,
4 TString kEmcalCellsName = "emcalCells",
8 // #### Define manager and data container names
9 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11 ::Error("AddTaskEmcalBadCells", "No analysis manager to connect to.");
15 // Check the analysis type using the event handlers connected to the analysis manager.
16 //==============================================================================
17 if (!mgr->GetInputEventHandler())
19 ::Error("AddTaskEmcalBadCells", "This task requires an input event handler");
23 TString wagonName = Form("EmcalBadCells%s",tag.Data());
25 //Configure DiJet task
26 AliAnalysisTaskEmcalBadCells *task = new AliAnalysisTaskEmcalBadCells(wagonName.Data(),kTRUE);
28 task->SetCaloCellsName(kEmcalCellsName.Data());
29 task->SetCentralityEstimator(CentEst);
30 task->SelectCollisionCandidates(pSel);
35 mgr->ConnectInput (task, 0, mgr->GetCommonInputContainer() );
38 AliAnalysisDataContainer *coutput1 = 0x0;
40 TString containerName1 = Form("%s",wagonName.Data());
42 TString outputfile = Form("%s:%s",AliAnalysisManager::GetCommonFileName(),wagonName.Data());
44 coutput1 = mgr->CreateContainer(containerName1, TList::Class(),AliAnalysisManager::kOutputContainer,outputfile);
46 mgr->ConnectOutput(task,1,coutput1);