]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/FLOW/macros/CreateAlienHandler.C
cut to remove laser tracks from good events !!!!!!
[u/mrichter/AliRoot.git] / PWG2 / 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 libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so libSTEER.so libTPCbase.so libTOFbase.so libTOFrec.so libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so libT0rec.so libTENDER.so libTENDERSupplies.so libPWG2flowCommon.so libPWG2flowTasks.so");
58   } 
59   else // load libs via par files
60   { 
61     plugin->SetAdditionalLibs("libGui.so libProof.so libMinuit.so libXMLParser.so libRAWDatabase.so libRAWDatarec.so libCDB.so libSTEERBase.so libSTEER.so libTPCbase.so libTOFbase.so libTOFrec.so libTRDbase.so libVZERObase.so libVZEROrec.so libT0base.so libT0rec.so libTENDER.so libTENDERSupplies.so");
62     plugin->EnablePackage("PWG2flowCommon.par");
63     plugin->EnablePackage("PWG2flowTasks.par");
64   }
65   // Do not specify your outputs by hand anymore:
66   plugin->SetDefaultOutputs(kTRUE);
67   // To specify your outputs by hand set plugin->SetDefaultOutputs(kFALSE); and comment in line plugin->SetOutputFiles("..."); 
68   // and plugin->SetOutputArchive("..."); bellow.
69   // Declare the output file names separated by blancs.
70   // (can be like: file.root or file.root@ALICE::Niham::File)
71   // plugin->SetOutputFiles("AnalysisResults.root");
72   // Optionally define the files to be archived.
73   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr@ALICE::NIHAM::File root_archive.zip:*.root@ALICE::NIHAM::File");
74   // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
75   // plugin->SetOutputArchive("log_archive.zip:");
76   // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
77   plugin->SetAnalysisMacro("flowAnalysis.C");
78   // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
79   plugin->SetSplitMaxInputFileNumber(100);
80   // Optionally set number of runs per masterjob:
81   plugin->SetNrunsPerMaster(1);
82   // Optionally set overwrite mode. Will trigger overwriting input data colections AND existing output files:
83   plugin->SetOverwriteMode(kTRUE);
84   // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
85   plugin->SetMaxInitFailed(5);
86   // Optionally resubmit threshold.
87   plugin->SetMasterResubmitThreshold(90);
88   // Optionally set time to live (default 30000 sec)
89   plugin->SetTTL(100000);
90   // Optionally set input format (default xml-single)
91   plugin->SetInputFormat("xml-single");
92   // Optionally modify the name of the generated JDL (default analysis.jdl)
93   plugin->SetJDLName("flowAnalysis.jdl");
94   // Optionally modify job price (default 1)
95   plugin->SetPrice(1);      
96   // Optionally modify split mode (default 'se')    
97   plugin->SetSplitMode("se");
98
99   return plugin;
100 }