2 // This macro serves to add the RSN analysis task to the steering macro.
5 // - dataLabel = a string with informations about the type of data
6 // which could be needed to be ported to the config macro
8 // - configMacro = macro which configures the analysis; it has *ALWAYS*
9 // defined inside a function named 'RsnConfigTask()',
10 // whatever the name of the macro itself, whose first two
11 // arguments must have to be the task and the 'dataLabel' argument.
13 Bool_t AddAnalysisTaskRsnTest
14 (const char *dataLabel, const char *configMacro = "ConfigTaskRsn2010.C")
16 // retrieve analysis manager
17 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
19 // initialize task with all available slots, even if not all of them will be used:
20 AliRsnAnalysisSE *task = new AliRsnAnalysisSE("RsnAnalysis");
21 task->SetZeroEventPercentWarning(100.0);
23 // load and execute configuration macro
24 gROOT->LoadMacro(configMacro);
25 if (!RsnConfigTask(task, dataLabel)) return kFALSE;
27 // add the task to manager
30 // connect input container according to source choice
31 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
33 // create paths for the output in the common file
34 Char_t commonPath[500];
35 sprintf(commonPath, "%s", AliAnalysisManager::GetCommonFileName());
37 // create containers for output
38 AliAnalysisDataContainer *outputInfo = mgr->CreateContainer("RsnInfo", TList::Class(), AliAnalysisManager::kOutputContainer, commonPath);
39 AliAnalysisDataContainer *outputHist = mgr->CreateContainer("RsnHist", TList::Class(), AliAnalysisManager::kOutputContainer, commonPath);
40 mgr->ConnectOutput(task, 1, outputInfo);
41 mgr->ConnectOutput(task, 2, outputHist);