]>
Commit | Line | Data |
---|---|---|
5bed89d0 | 1 | // $Id$ |
2 | ||
3de663ae | 3 | AliJetModelMergeBranches* AddTaskMergeBranches( |
5bed89d0 | 4 | const char *tracksName1 = "Tracks", |
5 | const char *tracksName2 = "Tracks2", | |
6 | const char *suffix = "Emb", | |
7 | const char *taskName = "JetModelMergeBranches" | |
8 | ) | |
9 | { | |
10 | // Get the pointer to the existing analysis manager via the static access method. | |
11 | //============================================================================== | |
12 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); | |
13 | if (!mgr) | |
14 | { | |
15 | ::Error("AddTaskMergeBranches", "No analysis manager to connect to."); | |
16 | return NULL; | |
17 | } | |
18 | ||
19 | // Check the analysis type using the event handlers connected to the analysis manager. | |
20 | //============================================================================== | |
21 | if (!mgr->GetInputEventHandler()) | |
22 | { | |
23 | ::Error("AddTaskMergeBranches", "This task requires an input event handler"); | |
24 | return NULL; | |
25 | } | |
26 | ||
27 | //------------------------------------------------------- | |
28 | // Init the task and do settings | |
29 | //------------------------------------------------------- | |
30 | ||
31 | AliJetModelMergeBranches *jetMerge = new AliJetModelMergeBranches(taskName); | |
32 | jetMerge->SetTracksName(tracksName1); | |
33 | jetMerge->SetTracksMergeName(tracksName2); | |
34 | jetMerge->SetClusName(""); | |
35 | jetMerge->SetSuffix(suffix); | |
36 | ||
37 | //------------------------------------------------------- | |
38 | // Final settings, pass to manager and set the containers | |
39 | //------------------------------------------------------- | |
40 | ||
41 | mgr->AddTask(jetMerge); | |
42 | ||
43 | // Create containers for input/output | |
44 | mgr->ConnectInput (jetMerge, 0, mgr->GetCommonInputContainer() ); | |
45 | ||
46 | return jetMerge; | |
47 | } |