ROOT logo
AliAnalysisGrid* CreateAlienHandler(const char * filename)
{
// 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;
   AliAnalysisAlien *plugin = new AliAnalysisAlien();
   plugin->SetOverwriteMode();
// Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
   plugin->SetRunMode("full");
   plugin->SetNtestFiles(3);
// Set versions of used packages
   plugin->SetAPIVersion("V1.1x");
//    plugin->SetROOTVersion("v5-27-05");
//    plugin->SetAliROOTVersion("v4-20-08-AN");
   //change: 28/09/10
   //VO_ALICE@AliRoot::v4-20-09-AN-build1 VO_ALICE@ROOT::v5-27-05-build3,VO_ALICE@GEANT3::v1-11-14 
   plugin->SetROOTVersion("v5-27-05-build3");
   plugin->SetAliROOTVersion("v4-20-09-AN-build1");

// Declare input data to be processed.
// Method 1: Create automatically XML collections using alien 'find' command.
// Define production directory LFN
// LHC10f
// /alice/sim/LHC10f4a/198000  
//   plugin->SetGridDataDir("/alice/sim/LHC10f4a");
   TString filenameStr = Form("%s",filename);
   filenameStr = TString("/alice/sim/")+filenameStr;
   const char * inputfilename = filenameStr.Data();
   plugin->SetGridDataDir(inputfilename);
// Set data search pattern
   plugin->SetDataPattern("*ESDs.root");
// Data pattern for reconstructed data
//   plugin->SetDataPattern("AliESDs.root");
// ...then add run numbers to be considered
   plugin->AddRunNumber(130844);
   //   plugin->AddRunNumber(198000);
// 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.
   plugin->SetGridWorkingDir(Form("work2/%s",filename));
   //plugin->SetGridWorkingDir("work");
// Declare alien output directory. Relative to working directory.
   plugin->SetGridOutputDir("output"); 

// Declare the analysis source files names separated by blancs. To be compiled runtime
// using ACLiC on the worker nodes.
   plugin->SetAnalysisSource("AliAnalysisTaskCentralityTreeMaker.cxx");
// Declare all libraries (other than the default ones for the framework. These will be
// loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
   plugin->SetAdditionalLibs("AliAnalysisTaskCentralityTreeMaker.h AliAnalysisTaskCentralityTreeMaker.cxx");

// Declare the output file names separated by blancs.
// (can be like: file.root or file.root@ALICE::Niham::File)
   plugin->SetDefaultOutputs();
// Optionally define the files to be archived.
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
//   plugin->SetOutputArchive("log_archive.zip:stdout,stderr");

// Optionally set a name for the generated analysis macro (default MyAnalysis.C)
   plugin->SetAnalysisMacro("CentralityAnalysis.C");

// Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
   plugin->SetSplitMaxInputFileNumber(100);
// Optionally modify the executable name (default analysis.sh)
   plugin->SetExecutable("CentralityAnalysis.sh");
// Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
   plugin->SetMaxInitFailed(5);
// Optionally resubmit threshold.
   plugin->SetMasterResubmitThreshold(90);
// Optionally set time to live (default 30000 sec)
   plugin->SetTTL(30000);
// Optionally set input format (default xml-single)
   plugin->SetInputFormat("xml-single");
// Optionally modify the name of the generated JDL (default analysis.jdl)
   plugin->SetJDLName("CentralityAnalysis.jdl");
// Optionally modify job price (default 1)
   plugin->SetPrice(1);      
// Optionally modify split mode (default 'se')    
   plugin->SetSplitMode("se");
   return plugin;
}
 CreateAlienHandler.C:1
 CreateAlienHandler.C:2
 CreateAlienHandler.C:3
 CreateAlienHandler.C:4
 CreateAlienHandler.C:5
 CreateAlienHandler.C:6
 CreateAlienHandler.C:7
 CreateAlienHandler.C:8
 CreateAlienHandler.C:9
 CreateAlienHandler.C:10
 CreateAlienHandler.C:11
 CreateAlienHandler.C:12
 CreateAlienHandler.C:13
 CreateAlienHandler.C:14
 CreateAlienHandler.C:15
 CreateAlienHandler.C:16
 CreateAlienHandler.C:17
 CreateAlienHandler.C:18
 CreateAlienHandler.C:19
 CreateAlienHandler.C:20
 CreateAlienHandler.C:21
 CreateAlienHandler.C:22
 CreateAlienHandler.C:23
 CreateAlienHandler.C:24
 CreateAlienHandler.C:25
 CreateAlienHandler.C:26
 CreateAlienHandler.C:27
 CreateAlienHandler.C:28
 CreateAlienHandler.C:29
 CreateAlienHandler.C:30
 CreateAlienHandler.C:31
 CreateAlienHandler.C:32
 CreateAlienHandler.C:33
 CreateAlienHandler.C:34
 CreateAlienHandler.C:35
 CreateAlienHandler.C:36
 CreateAlienHandler.C:37
 CreateAlienHandler.C:38
 CreateAlienHandler.C:39
 CreateAlienHandler.C:40
 CreateAlienHandler.C:41
 CreateAlienHandler.C:42
 CreateAlienHandler.C:43
 CreateAlienHandler.C:44
 CreateAlienHandler.C:45
 CreateAlienHandler.C:46
 CreateAlienHandler.C:47
 CreateAlienHandler.C:48
 CreateAlienHandler.C:49
 CreateAlienHandler.C:50
 CreateAlienHandler.C:51
 CreateAlienHandler.C:52
 CreateAlienHandler.C:53
 CreateAlienHandler.C:54
 CreateAlienHandler.C:55
 CreateAlienHandler.C:56
 CreateAlienHandler.C:57
 CreateAlienHandler.C:58
 CreateAlienHandler.C:59
 CreateAlienHandler.C:60
 CreateAlienHandler.C:61
 CreateAlienHandler.C:62
 CreateAlienHandler.C:63
 CreateAlienHandler.C:64
 CreateAlienHandler.C:65
 CreateAlienHandler.C:66
 CreateAlienHandler.C:67
 CreateAlienHandler.C:68
 CreateAlienHandler.C:69
 CreateAlienHandler.C:70
 CreateAlienHandler.C:71
 CreateAlienHandler.C:72
 CreateAlienHandler.C:73
 CreateAlienHandler.C:74
 CreateAlienHandler.C:75
 CreateAlienHandler.C:76
 CreateAlienHandler.C:77
 CreateAlienHandler.C:78
 CreateAlienHandler.C:79
 CreateAlienHandler.C:80
 CreateAlienHandler.C:81
 CreateAlienHandler.C:82
 CreateAlienHandler.C:83
 CreateAlienHandler.C:84
 CreateAlienHandler.C:85
 CreateAlienHandler.C:86
 CreateAlienHandler.C:87