1 AliAnalysisGrid* CreateAlienHandler() {
2 // Check if user has a valid token, otherwise make one. This has limitations.
3 // One can always follow the standard procedure of calling alien-token-init
4 // then source /tmp/gclient_env_$UID in the current shell.
5 if (!AliAnalysisGrid::CreateToken()) return NULL;
6 AliAnalysisAlien *plugin = new AliAnalysisAlien();
8 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
9 //plugin->SetRunMode("test");
10 //plugin->SetRunMode("offline");
11 //plugin->SetRunMode("submit");
12 plugin->SetRunMode("full");
13 //plugin->SetRunMode("terminate");
14 plugin->SetNtestFiles(1); // Relevant only for run mode "test"
16 // Set versions of used packages
17 plugin->SetAPIVersion("V1.1x");
18 plugin->SetROOTVersion("v5-26-00b-6");
19 plugin->SetAliROOTVersion("v4-19-22-AN");
21 // Declare input data to be processed - can be done in two ways:
22 // METHOD 1: Create automatically XML collections using alien 'find' command.
23 // ============================================================================
24 // Example 1: MC production (set in macro runFlowTask.C: DATA = kFALSE)
25 // plugin->SetGridDataDir("/alice/sim/LHC10a10");
26 // plugin->SetDataPattern("*AliESDs.root"); // The default data pattern, other may be "*tag.root", "*ESD.tag.root", etc
27 // plugin->AddRunNumber(105054); // Alternatively use e.g. plugin->SetRunRange(105044,106044); to add more runs in one go
28 // plugin->SetOutputToRunNo();
29 // ============================================================================
30 // Example 2: Real data (set in macro runFlowTask.C: DATA = kTRUE, MCEP = kFALSE)
31 plugin->SetGridDataDir("/alice/data/2010/LHC10c");
32 plugin->SetDataPattern("*ESDs/pass1/*ESDs.root");
33 plugin->SetRunPrefix("000");
35 plugin->AddRunNumber(120244);
36 plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(104044,106044); to add more runs in one go
38 plugin->SetOutputToRunNo();
39 // ============================================================================
41 // METHOD 2: Declare existing data files (raw collections, xml collections, root file)
42 // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
43 // XML collections added via this method can be combined with the first method if
44 // the content is compatible (using or not tags)
45 //plugin->AddDataFile("hijingWithoutFlow10000Evts.xml");
46 // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
47 // Define alien work directory where all files will be copied. Relative to alien $HOME.
48 plugin->SetGridWorkingDir("data");
49 // Declare alien output directory. Relative to working directory.
50 plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
51 // Declare the analysis source files names separated by blancs. To be compiled runtime
52 // using ACLiC on the worker nodes:
53 // ... (if this is needed see in official tutorial example how to do it!)
55 // Declare all libraries (other than the default ones for the framework. These will be
56 // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
57 //plugin->SetAdditionalLibs("libPWG2flowCommon.so libPWG2flowTasks.so");
58 // load libs via par files
59 plugin->EnablePackage("PWG2flowCommon.par");
60 plugin->EnablePackage("PWG2flowTasks.par");
61 // Do not specify your outputs by hand anymore:
62 plugin->SetDefaultOutputs(kTRUE);
63 // To specify your outputs by hand set plugin->SetDefaultOutputs(kFALSE); and comment in line plugin->SetOutputFiles("...");
64 // and plugin->SetOutputArchive("..."); bellow.
65 // Declare the output file names separated by blancs.
66 // (can be like: file.root or file.root@ALICE::Niham::File)
67 // plugin->SetOutputFiles("AnalysisResults.root");
68 // Optionally define the files to be archived.
69 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
70 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
71 // plugin->SetOutputArchive("log_archive.zip:");
72 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
73 plugin->SetAnalysisMacro("flowAnalysis.C");
74 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
75 plugin->SetSplitMaxInputFileNumber(100);
76 // Optionally set number of runs per masterjob:
77 plugin->SetNrunsPerMaster(1);
78 // Optionally set overwrite mode. Will trigger overwriting input data colections AND existing output files:
79 plugin->SetOverwriteMode(kTRUE);
80 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
81 plugin->SetMaxInitFailed(5);
82 // Optionally resubmit threshold.
83 plugin->SetMasterResubmitThreshold(90);
84 // Optionally set time to live (default 30000 sec)
85 plugin->SetTTL(20000);
86 // Optionally set input format (default xml-single)
87 plugin->SetInputFormat("xml-single");
88 // Optionally modify the name of the generated JDL (default analysis.jdl)
89 plugin->SetJDLName("flowAnalysis.jdl");
90 // Optionally modify job price (default 1)
92 // Optionally modify split mode (default 'se')
93 plugin->SetSplitMode("se");