]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/FLOW/macros/CreateAlienHandler.C
.so cleanup: restored .so in SetAdditionalLibs()
[u/mrichter/AliRoot.git] / PWGCF / FLOW / macros / CreateAlienHandler.C
1 AliAnalysisGrid* CreateAlienHandler(Bool_t bUseParFiles=kFALSE) {
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   AliAnalysisAlien *plugin = new AliAnalysisAlien();
6   
7   // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
8   //plugin->SetRunMode("test");
9   //plugin->SetRunMode("offline");
10   //plugin->SetRunMode("submit");
11   plugin->SetRunMode("full");
12   //plugin->SetRunMode("terminate");
13   plugin->SetNtestFiles(3); // Relevant only for run mode "test" 
14
15   // Set versions of used packages
16   plugin->SetAPIVersion("V1.1x");
17   plugin->SetROOTVersion("v5-27-06b");
18   plugin->SetAliROOTVersion("v4-21-13-AN");  
19   
20   // Declare input data to be processed - can be done in two ways:
21   // METHOD 1: Create automatically XML collections using alien 'find' command.
22   // ============================================================================
23   //  Example 1: MC production (set in macro runFlowTask.C: DATA = kFALSE)
24   //plugin->SetGridDataDir("/alice/sim/LHC10d4");
25   //plugin->SetDataPattern("*AliESDs.root"); // The default data pattern, other may be "*tag.root", "*ESD.tag.root", etc
26   //plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(105044,106044); to add more runs in one go  
27   //plugin->SetOutputToRunNo(); 
28   // ============================================================================
29   //  Example 2: Real data (set in macro runFlowTask.C: DATA = kTRUE, MCEP = kFALSE)
30   plugin->SetGridDataDir("/alice/data/2010/LHC10h");
31   plugin->SetDataPattern("*ESDs/pass1_5plus/*ESDs.root");
32   plugin->SetRunPrefix("000"); // IMPORTANT!
33   plugin->AddRunNumber(137161); 
34   // plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(104044,106044); to add more runs in one go 
35   plugin->SetOutputToRunNo();  
36   // ============================================================================
37  
38   // METHOD 2: Declare existing data files (raw collections, xml collections, root file)
39   // If no path mentioned data is supposed to be in the work directory (see SetGridWorkingDir())
40   // XML collections added via this method can be combined with the first method if
41   // the content is compatible (using or not tags)
42   //plugin->AddDataFile("hijingWithoutFlow10000Evts.xml");
43   //   plugin->AddDataFile("/alice/data/2008/LHC08c/000057657/raw/Run57657.Merged.RAW.tag.root");
44   // Define alien work directory where all files will be copied. Relative to alien $HOME.
45   plugin->SetGridWorkingDir("data");
46   // Declare alien output directory. Relative to working directory.
47   plugin->SetGridOutputDir("output1_5plus"); // In this case will be $HOME/work/output
48   // Declare the analysis source files names separated by blancs. To be compiled runtime
49   // using ACLiC on the worker nodes:
50   // ... (if this is needed see in official tutorial example how to do it!)
51
52   // Declare all libraries (other than the default ones for the framework. These will be
53   // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here.
54   //plugin->SetAdditionalLibs("libCORRFW.so libTOFbase.so libTOFrec.so");
55   if(!bUseParFiles)
56   {
57     plugin->SetAdditionalLibs("libGui.so libProof.so libMinuit.so libXMLParser.so "
58                               "libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so "
59                               "libSTEER.so libTPCbase.so libTOFbase.so libTOFrec.so "
60                               "libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so "
61                               "libT0rec.so libTender.so libTenderSupplies.so "
62                               "libPWGflowBase.so libPWGflowTasks.so");
63   } 
64   else // load libs via par files
65   { 
66     plugin->SetAdditionalLibs("libGui.so  libProof.so  libMinuit.so  libXMLParser.so "
67                               "libRAWDatabase.so  libRAWDatarec.so  libCDB.so  libSTEERBase.so "
68                               "libSTEER.so  libTPCbase.so  libTOFbase.so  libTOFrec.so "
69                               "libTRDbase.so  libVZERObase.so  libVZEROrec.so  libT0base.so "
70                               "libT0rec.so  libTender.so  libTenderSupplies.so");
71     plugin->EnablePackage("PWGflowBase.par");
72     plugin->EnablePackage("PWGflowTasks.par");
73   }
74   // Do not specify your outputs by hand anymore:
75   plugin->SetDefaultOutputs(kTRUE);
76   // To specify your outputs by hand set plugin->SetDefaultOutputs(kFALSE); and comment in line plugin->SetOutputFiles("..."); 
77   // and plugin->SetOutputArchive("..."); bellow.
78   // Declare the output file names separated by blancs.
79   // (can be like: file.root or file.root@ALICE::Niham::File)
80   // plugin->SetOutputFiles("AnalysisResults.root");
81   // Optionally define the files to be archived.
82   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
83   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
84   // plugin->SetOutputArchive("log_archive.zip:");
85   // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
86   plugin->SetAnalysisMacro("flowAnalysis.C");
87   // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
88   plugin->SetSplitMaxInputFileNumber(100);
89   // Optionally set number of runs per masterjob:
90   plugin->SetNrunsPerMaster(1);
91   // Optionally set overwrite mode. Will trigger overwriting input data colections AND existing output files:
92   plugin->SetOverwriteMode(kTRUE);
93   // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
94   plugin->SetMaxInitFailed(5);
95   // Optionally resubmit threshold.
96   plugin->SetMasterResubmitThreshold(90);
97   // Optionally set time to live (default 30000 sec)
98   plugin->SetTTL(100000);
99   // Optionally set input format (default xml-single)
100   plugin->SetInputFormat("xml-single");
101   // Optionally modify the name of the generated JDL (default analysis.jdl)
102   plugin->SetJDLName("flowAnalysis.jdl");
103   // Optionally modify job price (default 1)
104   plugin->SetPrice(1);      
105   // Optionally modify split mode (default 'se')    
106   plugin->SetSplitMode("se");
107
108   return plugin;
109 }