-// Check if user has a valid token, otherwise make one. This has limitations.
-// One can always follow the standard procedure of calling alien-token-init then
-// source /tmp/gclient_env_$UID in the current shell.
-// if (!AliAnalysisGrid::CreateToken()) return NULL;
- TGrid::Connect("alien:");
-
- AliAnalysisAlien *plugin = new AliAnalysisAlien();
-// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
- plugin->SetRunMode(mode);
- //plugin->SetRunMode("test");
-// Set versions of used packages
- plugin->SetAPIVersion("V1.1x");
- plugin->SetROOTVersion("v5-27-06-2");
- plugin->SetAliROOTVersion("v4-21-03-AN");
-// Declare input data to be processed.
-// Method 1: Create automatically XML collections using alien 'find' command.
-// Define production directory LFN
-// LHC09d
-// /alice/data/2009/LHC09d/000104892/ESDs/pass6/
- plugin->SetGridDataDir(dataset);
-// Set data search pattern
- plugin->SetDataPattern("AliESDs.root");
-// ...then add run numbers to be considered
-// plugin->AddRunNumber(104892);
-// plugin->AddRunNumber(300001);
-// Method 2: Declare existing data files (raw collections, xml collections, root file)
-// If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
-// XML collections added via this method can be combined with the first method if
-// the content is compatible (using or not tags)
- // plugin->AddDataFile("tag.xml");
- // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
-// Define alien work directory where all files will be copied. Relative to alien $HOME.
- TString output = "MultPb/Output_";
- dataset.ReplaceAll("/","_");
- output += dataset;
- plugin->SetGridWorkingDir(output.Data());
-// Declare alien output directory. Relative to working directory.
- plugin->SetGridOutputDir("out");
-// Declare the analysis source files names separated by blancs. To be compiled runtime
-// using ACLiC on the worker nodes.
- TIterator * iter = listToLoad->MakeIterator();
- TObjString * name = 0;
- TString sources = "";
- // while (name = (TObjString *)iter->Next()) {
- // gSystem->ExpandPathName(name->String());
- // name->String().ReplaceAll("+","");
- // sources = sources + name->String() + " ";
- // }
- while (name = (TObjString *)iter->Next()) {
+ AliAnalysisAlien * handler = new AliAnalysisAlien("test");
+ // input
+ handler->SetGridDataDir(dataset);
+ handler->AddRunNumber(runList);
+ if(dataset.Contains("sim")) handler->SetDataPattern("*AliESDs.root");
+ else handler->SetDataPattern("*pass2/*AliESDs.root");
+ handler->SetAnalysisMacro("MultPb.C");
+ handler->SetJDLName("MultPb.jdl");
+ handler->SetAdditionalRootLibs("libCore libTree libGeom libVMC libPhysics libSTEERBase libESD libAOD libANALYSIS libOADB libANALYSISalice");
+ handler->SetRunMode(mode);
+ TIterator * iter = listToLoad->MakeIterator();
+ TObjString * name = 0;
+ TString sources = "";
+ TString sourcescxxOnly = "";
+ while (name = (TObjString *)iter->Next()) {