AliPhiCorrelationsQATask *AddTaskPhiCorrelationsQA() { // Get the pointer to the existing analysis manager via the static access method. //============================================================================== AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); if (!mgr) { ::Error("AddTaskPhiCorrelations", "No analysis manager to connect to."); return NULL; } // Create the task and configure it. //=========================================================================== AliPhiCorrelationsQATask* ana = new AliPhiCorrelationsQATask(""); ana->SelectCollisionCandidates(AliVEvent::kMB | AliVEvent::kUserDefined); Bool_t isMC = (mgr->GetMCtruthEventHandler() != NULL); if (isMC) ana->SetUseUncheckedCentrality(); mgr->AddTask(ana); // Create ONLY the output containers for the data produced by the task. // Get and connect other common input/output containers via the manager as below //============================================================================== AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("histosPhiCorrelationsQA", TList::Class(),AliAnalysisManager::kOutputContainer,Form("%s", AliAnalysisManager::GetCommonFileName())); mgr->ConnectInput (ana, 0, mgr->GetCommonInputContainer()); mgr->ConnectOutput (ana, 1, coutput1 ); return ana; }