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 AddRsnAnalysisKStar
15 const char *options = "",
16 const char *taskName = "RsnAnalysis",
17 const char *configMacro = "RsnConfigKStar",
18 const char *configPath = "$(ALICE_INSTALL)/PWG2/RESONANCES/macros/train/LHC2010-pp7TeV"
21 // retrieve analysis manager
22 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
24 // create the task and connect with physics selection
25 AliRsnAnalysisSE *task = new AliRsnAnalysisSE(taskName);
26 task->SetZeroEventPercentWarning(100.0);
27 task->SelectCollisionCandidates();
29 // add the task to manager
32 // execute the related config with settings for adding and not adding ITS-SA
33 gROOT->ProcessLine(Form(".x %s/%s(%s,%s,%s)", configPath, configMacro, taskName, options , configPath));
34 gROOT->ProcessLine(Form(".x %s/%s(%s,%s,%s)", configPath, configMacro, taskName, Form("its+%s", options), configPath));
36 // connect input container according to source choice
37 mgr->ConnectInput(task, 0, mgr->GetCommonInputContainer());
39 // create paths for the output in the common file
40 Char_t commonPath[500];
41 sprintf(commonPath, "%s", AliAnalysisManager::GetCommonFileName());
43 // create containers for output
44 AliAnalysisDataContainer *outputInfo = mgr->CreateContainer("RsnInfo", TList::Class(), AliAnalysisManager::kOutputContainer, commonPath);
45 AliAnalysisDataContainer *outputHist = mgr->CreateContainer("RsnHist", TList::Class(), AliAnalysisManager::kOutputContainer, commonPath);
46 mgr->ConnectOutput(task, 1, outputInfo);
47 mgr->ConnectOutput(task, 2, outputHist);