]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FLOW/macros/CreateAlienHandler.C
cut to remove laser tracks from good events !!!!!!
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / CreateAlienHandler.C
CommitLineData
20717aa6 1AliAnalysisGrid* CreateAlienHandler(Bool_t bUseParFiles=kFALSE) {
9cc5e012 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.
9cc5e012 5 AliAnalysisAlien *plugin = new AliAnalysisAlien();
61e0c8c0 6
9cc5e012 7 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
a02a1889 8 //plugin->SetRunMode("test");
9 //plugin->SetRunMode("offline");
10 //plugin->SetRunMode("submit");
11 plugin->SetRunMode("full");
12 //plugin->SetRunMode("terminate");
32b846cd 13 plugin->SetNtestFiles(3); // Relevant only for run mode "test"
61e0c8c0 14
9cc5e012 15 // Set versions of used packages
16 plugin->SetAPIVersion("V1.1x");
8544d490 17 plugin->SetROOTVersion("v5-27-06b");
bdd1ed02 18 plugin->SetAliROOTVersion("v4-21-13-AN");
5c09ff70 19
61e0c8c0 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)
8544d490 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();
61e0c8c0 28 // ============================================================================
29 // Example 2: Real data (set in macro runFlowTask.C: DATA = kTRUE, MCEP = kFALSE)
8544d490 30 plugin->SetGridDataDir("/alice/data/2010/LHC10h");
32b846cd 31 plugin->SetDataPattern("*ESDs/pass1_5plus/*ESDs.root");
8544d490 32 plugin->SetRunPrefix("000"); // IMPORTANT!
32b846cd 33 plugin->AddRunNumber(137161);
5c09ff70 34 // plugin->AddRunNumber(119844); // Alternatively use e.g. plugin->SetRunRange(104044,106044); to add more runs in one go
8544d490 35 plugin->SetOutputToRunNo();
61e0c8c0 36 // ============================================================================
37
38 // METHOD 2: Declare existing data files (raw collections, xml collections, root file)
9cc5e012 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.
a02a1889 45 plugin->SetGridWorkingDir("data");
9cc5e012 46 // Declare alien output directory. Relative to working directory.
32b846cd 47 plugin->SetGridOutputDir("output1_5plus"); // In this case will be $HOME/work/output
9cc5e012 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.
32b846cd 54 //plugin->SetAdditionalLibs("libCORRFW.so libTOFbase.so libTOFrec.so");
5c09ff70 55 if(!bUseParFiles)
56 {
2b1eaa10 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");
32b846cd 58 }
59 else // load libs via par files
60 {
2b1eaa10 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");
32b846cd 62 plugin->EnablePackage("PWG2flowCommon.par");
63 plugin->EnablePackage("PWG2flowTasks.par");
64 }
a02a1889 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.
9cc5e012 69 // Declare the output file names separated by blancs.
70 // (can be like: file.root or file.root@ALICE::Niham::File)
a02a1889 71 // plugin->SetOutputFiles("AnalysisResults.root");
9cc5e012 72 // Optionally define the files to be archived.
a02a1889 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:");
9cc5e012 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);
a02a1889 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);
9cc5e012 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)
5c09ff70 89 plugin->SetTTL(100000);
9cc5e012 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}