1 AliAnalysisTaskMEVertexingHF *AddTaskHFMixing() {
3 // Creates a task for event mixing and adds it to the analysis manager.
7 // Get the pointer to the existing analysis manager via the static access method.
8 //==============================================================================
9 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
11 ::Error("AddTaskHFMixing", "No analysis manager to connect to.");
15 // This task requires AOD input handler and an AOD output handler.
16 // Check this using the analysis manager.
17 //===============================================================================
19 // Check if AOD output handler exist.
20 AliAODHandler *aodh = (AliAODHandler*)mgr->GetOutputEventHandler();
22 ::Error("AddTaskMixing", "HF vertexing task needs the manager to have an AOD output handler.");
26 // Create the task, add it to the manager and configure it.
27 //===========================================================================
28 AliAnalysisTaskMEVertexingHF *hfTask = new AliAnalysisTaskMEVertexingHF("mixing vertexing HF");
32 // Create containers for input/output
33 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("cchain",TChain::Class(), AliAnalysisManager::kInputContainer);
34 mgr->ConnectInput(hfTask,0,mgr->GetCommonInputContainer());
35 mgr->ConnectOutput(hfTask,0,mgr->GetCommonOutputContainer());