2 // This is an example steering macro for running RSN analysis task
3 // with the AliEn plugin to launch a multiple analysis.
7 // - runMode = AliEn plugin run mode
8 // - suffix = eventual suffix which is attached to the automatic name created for outputs
9 // - partname = a string which defines the resonance name (used for output)
10 // - runList = configuration file whith gives list of runs, pattern, prefix, options and AliEn path
11 // - split = corresponding JDL value
12 // - nmerge = number of outputs to be merged per stage
14 // - taskList = a string containin all the 'add-task' macros to be used
15 // - taskPath = the uniqu pathe where all 'add-task' macros (and all their needs) are stored
17 // - workDirBase = path of the working directory (starting from AliEn home)
18 // - outDir = path of the output directory (w.r. to workDir)
22 // - in case the source is an ESD, and if inputs are a MC production
23 // the MC input handler is created by default
34 const char *alienJobName,
35 const char *alienRunPath,
36 const char *alienRunPrefix,
37 const char *alienRunPattern,
38 const char *alienRunList,
43 const char *macroPath,
48 // === PREPARATION ==============================================================================
51 // execute the general setup from the apposite macro
52 // it returns also a TString value with the input tree name
53 gROOT->LoadMacro("../AnalysisSetupRsnMini.C");
54 TString out = Setup(nmix, options, "analysis.root", macroPath);
55 if (out.Length() < 1) return;
58 // === PLUGIN CONFIGURATION =====================================================================
61 // load macro for plugin setup
62 gSystem->AddIncludePath("-I$ALICE_ROOT/include");
63 gROOT->LoadMacro("SetupPlugin.C++g");
66 PluginSetup::alienInputRuns = kTRUE;
67 PluginSetup::nRunsPerMaster = runsPerMaster;
68 PluginSetup::runPath = alienRunPath;
69 PluginSetup::runPrefix = alienRunPrefix;
70 PluginSetup::runPattern = alienRunPattern;
71 PluginSetup::runList = alienRunList;
72 PluginSetup::split = split;
73 PluginSetup::maxMergeFiles = nmerge;
76 PluginSetup::workDir = "analysis/RSNpackage/mini/";
77 PluginSetup::workDir += alienDir;
79 // define common root for all generated files
80 PluginSetup::jobName = alienJobName;
82 // define additional libraries
83 PluginSetup::addLibs = addLibs;
84 PluginSetup::addPar = addPars;
86 // additional modalities
87 PluginSetup::rootVersion = "v5-30-06-1";
88 PluginSetup::aliVersion = "v5-02-19-AN";
90 // create the plugin (need to know if we want tender)
91 if (!PluginSetup::CreatePlugin()) return;
92 PluginSetup::plugin->SetRunMode(runMode);
95 // === ANALYSIS EXECUTION =======================================================================
98 // add plugin to analysis manager
99 AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
101 mgr->SetGridHandler(PluginSetup::plugin);
103 // initialize and start analysis
104 if (!mgr->InitAnalysis()) {
105 ::Error("runPlugin.C", "Failed to init analysis");
109 mgr->StartAnalysis("grid");