3 AliJetModelMergeBranches* AddTaskMergeBrances(
4 const char *tracksName1 = "Tracks",
5 const char *tracksName2 = "Tracks2",
6 const char *suffix = "Emb",
7 const char *taskName = "JetModelMergeBranches"
10 // Get the pointer to the existing analysis manager via the static access method.
11 //==============================================================================
12 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
15 ::Error("AddTaskMergeBranches", "No analysis manager to connect to.");
19 // Check the analysis type using the event handlers connected to the analysis manager.
20 //==============================================================================
21 if (!mgr->GetInputEventHandler())
23 ::Error("AddTaskMergeBranches", "This task requires an input event handler");
27 //-------------------------------------------------------
28 // Init the task and do settings
29 //-------------------------------------------------------
31 AliJetModelMergeBranches *jetMerge = new AliJetModelMergeBranches(taskName);
32 jetMerge->SetTracksName(tracksName1);
33 jetMerge->SetTracksMergeName(tracksName2);
34 jetMerge->SetClusName("");
35 jetMerge->SetSuffix(suffix);
37 //-------------------------------------------------------
38 // Final settings, pass to manager and set the containers
39 //-------------------------------------------------------
41 mgr->AddTask(jetMerge);
43 // Create containers for input/output
44 mgr->ConnectInput (jetMerge, 0, mgr->GetCommonInputContainer() );