]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/EBYE/macros/CreateAlienHandler.C
41797c337e97372fe913ec2f6acb4681777a75fd
[u/mrichter/AliRoot.git] / PWG2 / EBYE / macros / CreateAlienHandler.C
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 then
4   //   source /tmp/gclient_env_$UID in the current shell.
5   // Set if you want to use par files on Grid:
6   Bool_t bUseParFiles = kTRUE;
7
8   AliAnalysisAlien *plugin = new AliAnalysisAlien();
9   
10   // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
11   //plugin->SetRunMode("test");
12   //plugin->SetRunMode("offline");
13   //plugin->SetRunMode("submit");
14   plugin->SetRunMode("full");
15   //plugin->SetRunMode("terminate");
16   plugin->SetNtestFiles(3); // Relevant only for run mode "test" 
17
18   // Set versions of used packages
19   plugin->SetAPIVersion("V1.1x");
20   plugin->SetROOTVersion("v5-27-06b");
21   plugin->SetAliROOTVersion("v4-21-12-AN");  
22   
23   // Declare input data to be processed - can be done in two ways:
24   // METHOD 1: Create automatically XML collections using alien 'find' command.
25   // ============================================================================
26   //  Example 1: MC production (set in macro runFlowTask.C: DATA = kFALSE)
27   //plugin->SetGridDataDir("/alice/sim/LHC10d4");
28   //plugin->SetDataPattern("*AliESDs.root"); // The default data pattern, other may be "*tag.root", "*ESD.tag.root", etc
29   //plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(105044,106044); to add more runs in one go  
30   //plugin->SetOutputToRunNo(); 
31   // ============================================================================
32   //  Example 2: Real data (set in macro runFlowTask.C: DATA = kTRUE, MCEP = kFALSE)
33   plugin->SetGridDataDir("/alice/data/2010/LHC10h");
34   plugin->SetDataPattern("*ESDs/pass1_4plus/*ESDs.root");
35   plugin->SetRunPrefix("000"); // IMPORTANT!
36   plugin->AddRunNumber(137161);
37   plugin->AddRunNumber(137431);
38   plugin->AddRunNumber(137549);
39   plugin->AddRunNumber(137595);
40   plugin->AddRunNumber(137638);
41   plugin->AddRunNumber(137639);
42   plugin->AddRunNumber(137693);
43   // plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(104044,106044); to add more runs in one go 
44   plugin->SetOutputToRunNo();  
45
46   // Define alien work directory where all files will be copied. Relative to alien $HOME.
47   plugin->SetGridWorkingDir("Fluctuations/PbPb/2.76TeV/LHC10h/Pass1_4Plus/TPCOnly");
48   // Declare alien output directory. Relative to working directory.
49   plugin->SetGridOutputDir("output"); // In this case will be $HOME/work/output
50   // Declare the analysis source files names separated by blancs. To be compiled runtime
51   // using ACLiC on the worker nodes.
52   plugin->SetAnalysisSource("AliAnalysisFluctuationsTask.cxx");
53   // Declare all libraries (other than the default ones for the framework. These will be
54   // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
55   //plugin->SetAdditionalLibs("AliAnalysisFluctuationsTask.h AliAnalysisFluctuationsTask.cxx");
56   if(!bUseParFiles) 
57     plugin->SetAdditionalLibs("libPWG2ebye.so");
58   else 
59     plugin->EnablePackage("PWG2ebye.par");
60
61   // Do not specify your outputs by hand anymore:
62   plugin->SetDefaultOutputs(kTRUE);
63   // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
64   plugin->SetAnalysisMacro("fluctuationsAnalysis.C");
65   // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
66   plugin->SetSplitMaxInputFileNumber(450);
67   
68   // Optionally set time to live (default 30000 sec)
69   plugin->SetTTL(30000);
70   // Optionally set input format (default xml-single)
71   plugin->SetInputFormat("xml-single");
72   // Optionally modify the name of the generated JDL (default analysis.jdl)
73   plugin->SetJDLName("TaskFluctuations.jdl");
74   // Optionally modify job price (default 1)
75   plugin->SetPrice(1);      
76   // Optionally modify split mode (default 'se')    
77   plugin->SetSplitMode("se");
78   
79   return plugin;
80 }