6f791cc3 |
1 | /** |
2 | * @defgroup pwg2_forward_scripts Scripts used in the analysis |
3 | * |
4 | * @ingroup pwg2_forward |
5 | */ |
6 | /** |
7 | * @file |
8 | * @ingroup pwg2_forward_scripts |
9 | * |
10 | */ |
11 | /** |
12 | * This is the macro to include the Forward multiplicity in a train. |
13 | * |
14 | * @ingroup pwg2_forward_scripts |
15 | */ |
16 | AliAnalysisTask* AddTaskCentral() |
17 | { |
18 | gSystem->Load("libPWG2forward2"); |
19 | |
20 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
21 | if (!mgr) { |
22 | Error("AddTaskCentral", "No analysis manager to connect to."); |
23 | return NULL; |
24 | } |
25 | |
26 | // --- Make the task and add it to the manager --------------------- |
27 | AliCentralMultiplicityTask* task = new AliCentralMultiplicityTask("Central"); |
28 | task->InitManager(1,900,5); |
29 | mgr->AddTask(task); |
30 | |
31 | // --- Make the output container and connect it -------------------- |
32 | TString outputfile = AliAnalysisManager::GetCommonFileName(); |
33 | |
34 | AliAnalysisDataContainer* histOut = |
35 | mgr->CreateContainer("Central", TList::Class(), |
36 | AliAnalysisManager::kOutputContainer,outputfile); |
37 | mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer()); |
38 | mgr->ConnectOutput(task, 1, histOut); |
39 | |
40 | return task; |
41 | } |