3 AliAnalysisTaskRhoBase* AddTaskRhoBase(
4 const char *rhoname = "Rho",
6 const char *taskname = "Rho_Base"
9 // Get the pointer to the existing analysis manager via the static access method.
10 //==============================================================================
11 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
14 ::Error("AddTaskRhoBase", "No analysis manager to connect to.");
18 // Check the analysis type using the event handlers connected to the analysis manager.
19 //==============================================================================
20 if (!mgr->GetInputEventHandler())
22 ::Error("AddTaskRho", "This task requires an input event handler");
26 //-------------------------------------------------------
27 // Init the task and do settings
28 //-------------------------------------------------------
30 AliAnalysisTaskRhoBase *rhotask = new AliAnalysisTaskRhoBase(taskname);
31 rhotask->SetRhoName(rhoname);
32 rhotask->SetRhoFunction(rfunc);
34 //-------------------------------------------------------
35 // Final settings, pass to manager and set the containers
36 //-------------------------------------------------------
38 mgr->AddTask(rhotask);
40 // Create containers for input/output
41 mgr->ConnectInput (rhotask, 0, mgr->GetCommonInputContainer() );