3 AliEmcalCompatTask* AddTaskEmcalCompat()
5 // Get the pointer to the existing analysis manager via the static access method.
6 //==============================================================================
7 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
10 ::Error("AddTaskEmcalCompat", "No analysis manager to connect to.");
14 // Check the analysis type using the event handlers connected to the analysis manager.
15 //==============================================================================
16 if (!mgr->GetInputEventHandler())
18 ::Error("AddTaskEmcalCompat", "This task requires an input event handler");
21 if (!(mgr->GetInputEventHandler()->InheritsFrom("AliESDInputHandler")))
23 ::Error("AddTaskEmcalCompat", "This task works only for (skimmed) ESD");
27 //-------------------------------------------------------
28 // Init the task and do settings
29 //-------------------------------------------------------
31 AliEmcalCompatTask *ectask = new AliEmcalCompatTask("EmcCompatTask");
33 //-------------------------------------------------------
34 // Final settings, pass to manager and set the containers
35 //-------------------------------------------------------
38 // Create containers for input/output
39 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
41 mgr->ConnectInput (ectask, 0, cinput1 );