]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG0/mcValidation/runWithHandler.C
Make it find libraries independently of location
[u/mrichter/AliRoot.git] / PWG0 / mcValidation / runWithHandler.C
1
2 AliAnalysisGrid* runWithHandler()
3 {
4         // Check if user has a valid token, otherwise make one. This has limitations.
5         if (!AliAnalysisGrid::CreateToken()) return NULL;
6         AliAnalysisAlien *plugin = new AliAnalysisAlien();
7         // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
8         plugin->SetRunMode("full");
9         
10         // Set versions of used packages
11         plugin->SetAPIVersion("V1.1x");
12         plugin->SetROOTVersion("v5-26-00b-2");
13         plugin->SetAliROOTVersion("v4-19-10-AN");
14         
15         // Declare input data to be processed.
16         // Method 1: Create automatically XML collections using alien 'find' command.
17         // Define production directory LFN
18         //plugin->SetGridDataDir("/alice/sim/LHC10a6");
19         // On real reconstructed data:
20         plugin->SetGridDataDir("/alice/data/2009/LHC09d");
21         // Set data search pattern
22         //plugin->SetDataPattern("*ESDs.root");
23         // Data pattern for reconstructed data
24         plugin->SetDataPattern("*ESDs/pass4/*ESDs.root");
25         plugin->SetRunPrefix("000");   // real data
26         // ...then add run numbers to be considered
27         plugin->AddRunNumber(104824);
28         // plugin->AddRunNumber(104065);  // real data
29         // plugin->SetOutputSingleFolder("output");
30         // plugin->SetOutputToRunNo();
31
32         // Method 2: Declare existing data files (raw collections, xml collections, root file)
33         // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
34         // XML collections added via this method can be combined with the first method if
35         // the content is compatible (using or not tags)
36         // plugin->AddDataFile("tag.xml");
37         // plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
38         // Define alien work directory where all files will be copied. Relative to alien $HOME.
39         plugin->SetGridWorkingDir("TrackletsTask");
40         // Declare alien output directory. Relative to working directory.
41         plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
42         // Declare the analysis source files names separated by blancs. To be compiled runtime
43         // using ACLiC on the worker nodes.
44         plugin->SetAnalysisSource("AliTrackletsTask.cxx");
45         // Declare all libraries (other than the default ones for the framework. These will be
46         // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
47         plugin->SetAdditionalLibs("AliTrackletsTask.h AliTrackletsTask.cxx");
48         // Declare the output file names separated by blancs.
49         // (can be like: file.root or file.root@ALICE::Niham::File)
50         //plugin->SetOutputFiles("Pt.ESD.1.root");
51         plugin->SetDefaultOutputs();
52         // Optionally define the files to be archived.
53         //   plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
54         plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
55         // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
56         plugin->SetAnalysisMacro("MacroTrackletsTask.C");
57         // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
58         plugin->SetSplitMaxInputFileNumber(50);
59         // Optionally modify the executable name (default analysis.sh)
60         plugin->SetExecutable("ExecutableTrackletsTask.sh");
61         // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
62         //   plugin->SetMaxInitFailed(5);
63         // Optionally resubmit threshold.
64         //   plugin->SetMasterResubmitThreshold(90);
65         // Optionally set time to live (default 30000 sec)
66         plugin->SetTTL(28000);
67         // Optionally set input format (default xml-single)
68         plugin->SetInputFormat("xml-single");
69         // Optionally modify the name of the generated JDL (default analysis.jdl)
70         plugin->SetJDLName("JdlTrackletsTask.jdl");
71         // Optionally modify job price (default 1)
72         plugin->SetPrice(1);      
73         // Optionally modify split mode (default 'se')    
74         plugin->SetSplitMode("se");
75         return plugin;
76 }