]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/STRANGENESS/LambdaK0PbPb/CreateAlienHandler.C
Merge branch 'feature-movesplit'
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0PbPb / CreateAlienHandler.C
CommitLineData
e886738f 1
2AliAnalysisGrid* CreateAlienHandler(const char * runlist, TList * listCode, const char * mode, Bool_t isMC)
3{
4 // FIXME: different paths
5 // Check if user has a valid token, otherwise make one. This has limitations.
6 // One can always follow the standard procedure of calling alien-token-init then
7 // source /tmp/gclient_env_$UID in the current shell.
8797f8b6 8// if (!AliAnalysisGrid::CreateToken()) return NULL;
e886738f 9 AliAnalysisAlien *plugin = new AliAnalysisAlien();
10 plugin->SetOverwriteMode();
11 // Set the run mode (can be "full", "test", "offline", "submit" or "terminate")
12 plugin->SetRunMode(mode);
13 // Set versions of used packages
14 // FIXME: PAR FILES OPTIONAL?
15 plugin->SetAPIVersion("V1.1x");
8797f8b6 16 plugin->SetROOTVersion("v5-28-00a");
17 plugin->SetAliROOTVersion("v4-21-20-AN");
e886738f 18// PAR files: I'm using a modified ANALYSISalice package, so I need to load par files for everything
8797f8b6 19/* plugin->EnablePackage("STEERBase");
e886738f 20 plugin->EnablePackage("ESD");
21 plugin->EnablePackage("AOD");
22 plugin->EnablePackage("CORRFW");
23 plugin->EnablePackage("ANALYSIS");
24 plugin->EnablePackage("ANALYSISalice");
25 plugin->EnablePackage("OADB");
8797f8b6 26*/
e886738f 27
28 // Declare input data to be processed.
29 // Method 1: Create automatically XML collections using alien 'find' command.
30 // Define production directory LFN
31 if(!isMC)
8797f8b6 32 //plugin->SetGridDataDir("/alice/data/2010/LHC10h/");
33 plugin->SetGridDataDir("/alice/sim/LHC11a10a/");
e886738f 34 else
8797f8b6 35 //plugin->SetGridDataDir("/alice/sim/LHC10h8/");
36 plugin->SetGridDataDir("/alice/sim/LHC11a10a/");
e886738f 37
38 // Set data search pattern
39 if(!isMC)
8797f8b6 40 //plugin->SetDataPattern("*/pass1/*AliESDs.root");
41 //plugin->SetDataPattern("*/pass2/*AliESDs.root");
42 plugin->SetDataPattern("*AliESDs.root");
e886738f 43 else
44 plugin->SetDataPattern("AliESDs.root");
45
46 plugin->SetNrunsPerMaster(1); // One run per master job
47
48 // ...then add run numbers to be considered
49 plugin->AddRunNumber(runlist);
50
51
8797f8b6 52 //plugin->SetGridWorkingDir("LambdaK0/");
53 plugin->SetGridWorkingDir("LambdaK0MC/");
e886738f 54 plugin->SetGridOutputDir("out");
55
56 // plugin->SetDefaultOutputs(kFALSE);
57 // plugin->SetOutputFiles("EventStat_temp.root lambdak0.root");
58 // plugin->SetOutputArchive("log_archive.zip:stdout,stderr");
59
60
61 // Declare the analysis source files names separated by blancs. To be compiled runtime
62 // using ACLiC on the worker nodes.
63
64 // Load additional stuff
65 TString cxxToLoad, hToLoad;
66 TIterator * iter = listToLoad->MakeIterator();
67 TObjString * str = 0;
68 Bool_t first = kTRUE;
69 while (str = (TObjString*) iter->Next()) {
70 cxxToLoad = cxxToLoad + (first ? "" : " ") + str->String();
71 str->String().ReplaceAll("cxx","h");
72 hToLoad = hToLoad + (first ? "" : " ") + str->String();
73 first = kFALSE;
74 }
75 plugin->SetAnalysisSource(cxxToLoad.Data());
76 plugin->SetAdditionalLibs((hToLoad + " " + cxxToLoad).Data());
77
78
79
80 // Optionally set a name for the generated analysis macro (default MyAnalysis.C)
81 plugin->SetAnalysisMacro("AnalysisStrange.C");
82 // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore)
83 //plugin->SetSplitMaxInputFileNumber(100);
84 plugin->SetSplitMaxInputFileNumber(50);
85 // Optionally set number of failed jobs that will trigger killing waiting sub-jobs.
86 plugin->SetMaxInitFailed(5);
87 // Optionally resubmit threshold.
88 plugin->SetMasterResubmitThreshold(90);
89 // Optionally set time to live (default 30000 sec)
90 plugin->SetTTL(90000);
91 // Optionally set input format (default xml-single)
92 plugin->SetInputFormat("xml-single");
93 // Optionally modify the name of the generated JDL (default analysis.jdl)
94 plugin->SetJDLName("TaskStrange.jdl");
95 // Optionally modify job price (default 1)
96 plugin->SetPrice(1);
97 // Optionally modify split mode (default 'se')
98 plugin->SetSplitMode("se");
99
100 return plugin;
101}