]>
Commit | Line | Data |
---|---|---|
fe0275ad | 1 | #include "Riostream.h" |
f59ecfbc | 2 | void LoadLibraries(); |
3 | void AddAnalysisTasks(); | |
4 | class AliAnalysisAlien; | |
5 | AliAnalysisAlien* CreateAlienHandler(const char *plugin_mode); | |
6 | ||
44a84424 | 7 | Int_t runNumbers[5] = {137844}; |
574b2e7b | 8 | |
cc0ef64f | 9 | Bool_t doCDBconnect = 1; |
0e23e583 | 10 | Bool_t doEventStat = 1; |
11 | Bool_t doCentrality = 1; | |
cc0ef64f | 12 | Bool_t doQAsym = 1; |
13 | Bool_t doVZERO = 1; // there is a 2nd file | |
14 | Bool_t doVertex = 1; | |
15 | Bool_t doSPD = 1; // needs RP | |
16 | Bool_t doTPC = 1; | |
17 | Bool_t doSDD = 1; // needs RP | |
18 | Bool_t doSSDdEdx = 1; | |
8e52a034 | 19 | // new |
cc0ef64f | 20 | Bool_t doTRD = 1; |
21 | Bool_t doITS = 1; | |
22 | Bool_t doCALO = 1; | |
23 | Bool_t doMUONTrig = 1; | |
24 | Bool_t doImpParRes = 1; | |
25 | Bool_t doMUON = 1; | |
26 | Bool_t doTOF = 1; | |
27 | Bool_t doHMPID = 1; | |
a05adbe9 | 28 | |
9bdd18e3 | 29 | Bool_t doMUONEff = 0; // NEEDS geometry |
30 | Bool_t doV0 = 0; // NEEDS MCtruth | |
f59ecfbc | 31 | |
9bdd18e3 | 32 | TString train_name = "QA"; // QA local folder name |
33 | TString train_tag = ""; // Train special tag appended to | |
34 | // visible name. ("sim", "pp", ...) | |
35 | // Name in train page (DON'T CHANGE) | |
36 | TString visible_name = Form("QA$2_$3%s", train_tag.Data()); //# FIXED # | |
37 | TString job_comment = "PWG1 QA train"; // Can add observations here | |
38 | // Job tag (DON'T CHANGE) | |
ab93cb3c | 39 | TString job_tag = Form("%s: %s", visible_name.Data(), job_comment.Data()); |
9bdd18e3 | 40 | // Package versions - Modify as needed |
44a84424 | 41 | TString root_version = "v5-27-06b"; |
35b82dbf | 42 | TString aliroot_version = "v4-21-10-AN"; |
9bdd18e3 | 43 | // Production directory - change as needed for test mode |
44a84424 | 44 | TString grid_datadir = "/alice/data/2010/LHC10h"; |
9bdd18e3 | 45 | // Work directory in GRID (DON'T CHANGE) |
46 | TString grid_workdir = "/alice/cern.ch/user/a/alidaq/QA/QA$2"; | |
47 | // Job splitting | |
44a84424 | 48 | Int_t grid_split = 10; // Splitting |
9bdd18e3 | 49 | // Debug level |
2251e21b | 50 | Int_t debug_level = 1; // Debugging |
35b82dbf | 51 | // File merging |
52 | Int_t maxMergeFiles = 10; // Max files to merge in a chunk | |
9bdd18e3 | 53 | // Data pattern - change as needed for test mode |
c1c35c14 | 54 | TString data_pattern = "*ESDs/pass1/*ESDs.root"; |
9bdd18e3 | 55 | // Output directory (DON'T CHANGE) |
56 | TString alien_outdir = "$1/QA$2"; | |
57 | // Input collection (production mode) | |
58 | TString data_collection = "$1/qa1.xml"; | |
59 | TString mergeExcludes = ""; // Files to be excluded for merging | |
35b82dbf | 60 | TString mergeDirName = "QA$2"; |
a9b5fbe0 | 61 | TString terminateFiles = "trending.root"; // Files produced during Terminate |
fe0275ad | 62 | |
574b2e7b | 63 | Bool_t useProductionMode = kTRUE; |
64 | Bool_t useMergeViaJDL = kTRUE; | |
44a84424 | 65 | Bool_t useFastReadOption = kTRUE; |
66 | Bool_t useOverwriteMode = kTRUE; | |
574b2e7b | 67 | Bool_t useDevelopmentVersion = kFALSE; |
fe0275ad | 68 | |
f59ecfbc | 69 | void PilotAnalysis(const char *plugin_mode = "full") |
70 | { | |
9bdd18e3 | 71 | TString smode(plugin_mode); |
72 | smode.ToLower(); | |
73 | if (smode == "test") useProductionMode = kFALSE; | |
74 | if (!useProductionMode) { | |
75 | TGrid::Connect("alien://"); | |
76 | if (!gGrid || !gGrid->IsConnected()) { | |
77 | ::Error("PilotAnalysis", "No grid connection"); | |
78 | return; | |
79 | } | |
80 | } | |
fe0275ad | 81 | // Write configuration |
82 | TString cdir = gSystem->WorkingDirectory(); | |
83 | gSystem->MakeDirectory(train_name); | |
84 | gSystem->ChangeDirectory(train_name); | |
85 | ofstream out; | |
86 | out.open(Form("%sConfig.C",train_name.Data()), ios::out); | |
87 | out << "{" << endl; | |
88 | out << " train_name = " << "\"" << train_name.Data() << "\";" << endl; | |
89 | out << " root_version = " << "\"" << root_version.Data() << "\";" << endl; | |
90 | out << " aliroot_version = " << "\"" << aliroot_version.Data() << "\";" << endl; | |
91 | out << " grid_datadir = " << "\"" << grid_datadir.Data() << "\";" << endl; | |
92 | if (!alien_outdir.Length()) alien_outdir = Form("output_%s",train_name.Data()); | |
93 | out << " alien_outdir = " << "\"" << alien_outdir.Data() << "\";" << endl; | |
94 | out << " doQAsim = " << doQAsym << ";" << endl; | |
95 | out << " doVZERO = " << doVZERO << ";" << endl; | |
96 | out << " doVertex = " << doVertex << ";" << endl; | |
97 | out << " doSPD = " << doSPD << ";" << endl; | |
98 | out << " doSDD = " << doSDD << ";" << endl; | |
574b2e7b | 99 | out << " doSSDdEdx = " << doSSDdEdx << ";" << endl; |
fe0275ad | 100 | out << " doTPC = " << doTPC << ";" << endl; |
a05adbe9 | 101 | out << " doTRD = " << doTRD << ";" << endl; |
102 | out << " doImpParRes = " << doImpParRes << ";" << endl; | |
103 | out << " doMUON = " << doMUON << ";" << endl; | |
c1c35c14 | 104 | out << " doTOF = " << doTOF << ";" << endl; |
105 | out << " doHMPID = " << doHMPID << ";" << endl; | |
fe0275ad | 106 | out << " doEventStat = " << doEventStat << ";" << endl; |
44a84424 | 107 | out << " doCentrality = " << doCentrality << ";" << endl; |
fe0275ad | 108 | out << "}" << endl; |
109 | out.close(); | |
110 | ||
f59ecfbc | 111 | // Load libraries |
44a84424 | 112 | gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD -I$ALICE_ROOT/PWG1"); |
f59ecfbc | 113 | LoadLibraries(); |
114 | // Create manager | |
115 | AliAnalysisManager *mgr = new AliAnalysisManager("PilotAnalysis", "Production train"); | |
574b2e7b | 116 | mgr->SetNSysInfo(100); |
44a84424 | 117 | mgr->SetDebugLevel(1); |
f59ecfbc | 118 | // Input handler |
119 | AliESDInputHandlerRP *esdHandler = new AliESDInputHandlerRP(); | |
574b2e7b | 120 | esdHandler->SetReadFriends(kTRUE); |
f59ecfbc | 121 | esdHandler->SetActiveBranches("ESDfriend"); |
122 | mgr->SetInputEventHandler(esdHandler); | |
9bdd18e3 | 123 | mgr->SetDebugLevel(debug_level); |
fe0275ad | 124 | |
f59ecfbc | 125 | // AnalysisTasks |
126 | AddAnalysisTasks(); | |
127 | // Grid handler | |
fe0275ad | 128 | AliAnalysisAlien *alienHandler = CreateAlienHandler(plugin_mode); |
f59ecfbc | 129 | mgr->SetGridHandler(alienHandler); |
130 | if (mgr->InitAnalysis()) { | |
131 | mgr->PrintStatus(); | |
8a67db85 | 132 | if (!strcmp(plugin_mode, "local")) mgr->StartAnalysis("local"); |
133 | else mgr->StartAnalysis("grid"); | |
f59ecfbc | 134 | } |
135 | } | |
136 | ||
137 | void LoadLibraries() | |
138 | { | |
e583cb58 | 139 | gSystem->Load("libANALYSIS"); |
140 | gSystem->Load("libANALYSISalice"); | |
141 | gSystem->Load("libCORRFW"); | |
142 | gSystem->Load("libTENDER"); | |
f59ecfbc | 143 | gSystem->Load("libPWG0base.so"); |
144 | gSystem->Load("libPWG0dep.so"); | |
145 | gSystem->Load("libPWG0selectors.so"); | |
146 | gSystem->Load("libPWG1.so"); | |
147 | gSystem->Load("libPWG2.so"); | |
148 | gSystem->Load("libPWG2forward.so"); | |
e583cb58 | 149 | |
e583cb58 | 150 | if (doCALO) { |
151 | gSystem->Load("libEMCALUtils"); | |
152 | gSystem->Load("libPWG4PartCorrBase"); | |
153 | gSystem->Load("libPWG4PartCorrDep"); | |
f59ecfbc | 154 | } |
9bdd18e3 | 155 | if(doMUONTrig) { |
e583cb58 | 156 | gSystem->Load("libPWG3base"); |
157 | gSystem->Load("libPWG3muon"); | |
158 | gSystem->Load("libPWG3muondep"); | |
159 | } | |
f59ecfbc | 160 | } |
161 | ||
162 | void AddAnalysisTasks() | |
163 | { | |
574b2e7b | 164 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
165 | mgr->SetCommonFileName("QAresults.root"); | |
2251e21b | 166 | // |
167 | // CDB connection | |
168 | // | |
169 | if (doCDBconnect) { | |
170 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskCDBconnect.C"); | |
171 | AliTaskCDBconnect *taskCDB = AddTaskCDBconnect(); | |
172 | if (!taskCDB) return; | |
8a67db85 | 173 | taskCDB->SetRunNumber(runNumbers[0]); |
2251e21b | 174 | } |
175 | ||
574b2e7b | 176 | // |
177 | // Event Statistics (Jan Fiete) | |
178 | // | |
574b2e7b | 179 | if (doEventStat) { |
180 | gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C"); | |
44a84424 | 181 | AliPhysicsSelectionTask* physSelTask = AddTaskPhysicsSelection(kFALSE /*MC*/); |
9bdd18e3 | 182 | // mgr->RegisterExtraFile("event_stat.root"); |
183 | if (!terminateFiles.IsNull()) terminateFiles += ","; | |
184 | terminateFiles += "event_stat.root"; | |
574b2e7b | 185 | } |
44a84424 | 186 | |
187 | // | |
188 | // Centrality (J. Thaeder) | |
189 | // | |
190 | if (doCentrality) { | |
0e23e583 | 191 | gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C"); |
039126a0 | 192 | AliCentralitySelectionTask *taskCentrality = AddTaskCentrality(); |
bf90a869 | 193 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/Centrality/AddTaskHIMultCorr.C"); |
44a84424 | 194 | AliAnalysisTaskHIMultCorr *taskHIcentrality = AddTaskHIMultCorr(); |
195 | } | |
196 | ||
f59ecfbc | 197 | // Vertexing (A. Dainese) |
198 | // | |
199 | if (doVertex) { | |
200 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskVertexESD.C"); | |
201 | AliAnalysisTaskVertexESD* taskvertexesd = AddTaskVertexESD(); | |
202 | taskvertexesd->SelectCollisionCandidates(); | |
203 | } | |
204 | ||
205 | // TPC QA (E. Sicking) | |
206 | // | |
207 | if (doQAsym) { | |
208 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskQAsym.C"); | |
574b2e7b | 209 | AliAnalysisTaskSE * taskqasim = AddTaskQAsym(0); |
f59ecfbc | 210 | taskqasim->SelectCollisionCandidates(); |
211 | } | |
212 | // | |
213 | // VZERO QA (C. Cheshkov) | |
214 | // | |
215 | if (doVZERO) { | |
216 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskVZEROQA.C"); | |
217 | AliAnalysisTaskSE * taskv0qa = AddTaskVZEROQA(0); | |
e583cb58 | 218 | // taskv0qa->SelectCollisionCandidates(); |
f59ecfbc | 219 | } |
f59ecfbc | 220 | // |
f409164d | 221 | // TPC (Jacek Otwinowski & Michael Knichel) |
f59ecfbc | 222 | // |
223 | if (doTPC) { | |
8a67db85 | 224 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/TPC/macros/AddTaskPerformanceTPCdEdxQA.C"); |
f409164d | 225 | AliPerformanceTask *tpcQA = AddTaskPerformanceTPCdEdxQA(kFALSE, kTRUE); |
226 | tpcQA->SelectCollisionCandidates(); | |
f59ecfbc | 227 | } |
228 | // | |
229 | // SPD (A. Mastroserio) | |
230 | // | |
231 | if (doSPD) { | |
232 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskSPDQA.C"); | |
233 | AliAnalysisTaskSE* taskspdqa = AddTaskSPDQA(); | |
574b2e7b | 234 | taskspdqa->SelectCollisionCandidates(); |
e583cb58 | 235 | } |
f59ecfbc | 236 | // |
237 | // SDD (F. Prino) | |
238 | // | |
239 | if (doSDD) { | |
240 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddSDDPoints.C"); | |
241 | AliAnalysisTaskSE* tasksdd = AddSDDPoints(); | |
242 | tasksdd->SelectCollisionCandidates(); | |
243 | } | |
574b2e7b | 244 | // |
245 | // SSD dEdx (Marek Chojnacki) | |
246 | // | |
247 | if (doSSDdEdx) { | |
248 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/PilotTrain/AddTaskdEdxSSDQA.C"); | |
249 | AliAnalysisTaskSE* taskssddedx = AddTaskdEdxSSDQA(); | |
250 | taskssddedx->SelectCollisionCandidates(); | |
251 | } | |
8e52a034 | 252 | |
e583cb58 | 253 | // |
254 | // ITS | |
255 | // | |
256 | if (doITS) { | |
257 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskPerformanceITS.C"); | |
258 | AliAnalysisTaskITSTrackingCheck *itsQA = AddTaskPerformanceITS(kFALSE); | |
259 | } | |
8e52a034 | 260 | // |
261 | // TRD (Alex Bercuci, M. Fasel) | |
262 | // | |
263 | if(doTRD) { | |
e583cb58 | 264 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTrainPerformanceTRD.C"); |
92238d29 | 265 | // steer individual TRD tasks |
266 | Bool_t | |
267 | doCheckESD(kTRUE), // AliTRDcheckESD | |
268 | doCheckDET(kTRUE), // AliTRDcheckDET | |
269 | doEffic(kTRUE), // AliTRDefficiency | |
270 | doResolution(kTRUE),// AliTRDresolution | |
271 | doCheckPID(kTRUE), // AliTRDcheckPID | |
272 | doV0Monitor(kFALSE);// AliTRDv0Monitor | |
273 | AddTrainPerformanceTRD(Translate(doCheckESD, doCheckDET, doEffic, doResolution, doCheckPID, doV0Monitor)); | |
8e52a034 | 274 | } |
275 | ||
276 | // | |
277 | // Calorimetry (Gustavo Conesa) | |
278 | // | |
279 | ||
280 | if(doCALO) { | |
281 | gROOT->LoadMacro("$ALICE_ROOT/PWG4/macros/QA/AddTaskCalorimeterQA.C"); | |
282 | AliAnalysisTaskParticleCorrelation *taskCaloQA = AddTaskCalorimeterQA("ESD", kTRUE, kFALSE); | |
2efff183 | 283 | taskCaloQA->SetDebugLevel(0); |
8e52a034 | 284 | } |
285 | ||
286 | // | |
287 | // Muon Trigger | |
288 | // | |
289 | ||
290 | if(doMUONTrig) { | |
291 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskMTRchamberEfficiency.C"); | |
292 | AliAnalysisTaskTrigChEff *taskMuonTrig = AddTaskMTRchamberEfficiency(); | |
293 | } | |
294 | ||
295 | // | |
296 | // Muon Efficiency | |
297 | // | |
298 | ||
299 | if(doMUONEff) { | |
300 | gROOT->LoadMacro("$ALICE_ROOT/PWG3/muondep/AddTaskMUONTrackingEfficiency.C"); | |
301 | AliAnalysisTaskMuonTrackingEff *taskMuonTrackEff = AddTaskMUONTrackingEfficiency(); | |
302 | } | |
303 | ||
304 | // | |
305 | // V0-Decay Reconstruction (Ana Marin) | |
306 | // | |
307 | ||
308 | if (doV0) { | |
309 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskV0QA.C"); | |
310 | AliAnalysisTaskV0QA *taskv0QA = AddTaskV0QA(kFALSE); | |
311 | } | |
c1c35c14 | 312 | // |
a05adbe9 | 313 | // Impact parameter resolution (xianbao.yuan@pd.infn.it, andrea.dainese@pd.infn.it) |
314 | // | |
315 | if (doImpParRes) { | |
316 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/macros/AddTaskImpParRes.C"); | |
44a84424 | 317 | // AliAnalysisTaskSE* taskimpparres= AddTaskImpParRes(); |
318 | AliAnalysisTaskSE* taskimpparres= AddTaskImpParRes(kFALSE,-1,kFALSE,kFALSE); | |
a05adbe9 | 319 | taskimpparres->SelectCollisionCandidates(); |
320 | } | |
c1c35c14 | 321 | // |
a05adbe9 | 322 | // MUON QA (Philippe Pillot) |
323 | // | |
324 | if (doMUON) { | |
325 | gROOT->LoadMacro("$ALICE_ROOT/PWG3/muon/AddTaskMuonQA.C"); | |
326 | AliAnalysisTaskSE* taskmuonqa= AddTaskMuonQA(); | |
327 | } | |
c1c35c14 | 328 | // |
329 | // TOF (Francesca Bellini) | |
330 | // | |
331 | if (doTOF) { | |
332 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/TOF/AddTaskTOFQA.C"); | |
333 | AliAnalysisTaskTOFqa *tofQA = AddTaskTOFQA(); | |
334 | tofQA->SelectCollisionCandidates(); | |
335 | } | |
336 | // | |
337 | // HMPID QA (Giacomo Volpe) | |
338 | // | |
339 | if (doHMPID) { | |
340 | gROOT->LoadMacro("$ALICE_ROOT/PWG1/HMPID/AddTaskHmpidQA.C"); | |
341 | AliAnalysisTaskSE* taskhmpidqa= AddTaskHmpidQA(kFALSE); | |
342 | } | |
f59ecfbc | 343 | } |
344 | ||
345 | //______________________________________________________________________________ | |
346 | AliAnalysisAlien* CreateAlienHandler(const char *plugin_mode) | |
347 | { | |
348 | // Check if user has a valid token, otherwise make one. This has limitations. | |
349 | // One can always follow the standard procedure of calling alien-token-init then | |
350 | // source /tmp/gclient_env_$UID in the current shell. | |
351 | if (!AliAnalysisGrid::CreateToken()) return NULL; | |
352 | AliAnalysisAlien *plugin = new AliAnalysisAlien(); | |
353 | // Set the run mode (can be "full", "test", "offline", "submit" or "terminate") | |
354 | plugin->SetRunMode(plugin_mode); | |
9bdd18e3 | 355 | if (useProductionMode) { |
356 | plugin->SetProductionMode(); | |
357 | plugin->AddDataFile(data_collection); | |
358 | } | |
fe0275ad | 359 | plugin->SetJobTag(job_tag); |
44a84424 | 360 | plugin->SetNtestFiles(5); |
9bdd18e3 | 361 | plugin->SetCheckCopy(kFALSE); |
35b82dbf | 362 | plugin->SetMergeDirName(mergeDirName); |
bf90a869 | 363 | // plugin->SetOneStageMerging(kTRUE); |
f59ecfbc | 364 | // Set versions of used packages |
f59ecfbc | 365 | plugin->SetAPIVersion("V1.1x"); |
fe0275ad | 366 | plugin->SetROOTVersion(root_version); |
367 | plugin->SetAliROOTVersion(aliroot_version); | |
f59ecfbc | 368 | // Declare input data to be processed. |
369 | // Method 1: Create automatically XML collections using alien 'find' command. | |
370 | // Define production directory LFN | |
fe0275ad | 371 | plugin->SetGridDataDir(grid_datadir); |
f59ecfbc | 372 | // Set data search pattern |
fe0275ad | 373 | plugin->SetDataPattern(data_pattern); |
f59ecfbc | 374 | // ...then add run numbers to be considered |
375 | // if (!iAODanalysis) plugin->SetRunRange(run_range[0], run_range[1]); | |
574b2e7b | 376 | // plugin->SetOutputSingleFolder("output"); |
9bdd18e3 | 377 | if (!useProductionMode) { |
378 | plugin->SetRunPrefix("000"); | |
379 | plugin->SetOutputToRunNo(); | |
380 | for (Int_t i=0; i<2; i++) { | |
381 | if (!runNumbers[i]) break; | |
382 | plugin->AddRunNumber(runNumbers[i]); | |
383 | } | |
384 | } | |
f59ecfbc | 385 | // Define alien work directory where all files will be copied. Relative to alien $HOME. |
9bdd18e3 | 386 | plugin->SetGridWorkingDir(grid_workdir); |
f59ecfbc | 387 | // Declare alien output directory. Relative to working directory. |
fe0275ad | 388 | if (alien_outdir.IsNull()) alien_outdir = Form("output_%s",train_name.Data()); |
389 | plugin->SetGridOutputDir(alien_outdir); | |
f59ecfbc | 390 | |
574b2e7b | 391 | if (useDevelopmentVersion) { |
392 | plugin->EnablePackage("STEERBase"); | |
393 | plugin->EnablePackage("ESD"); | |
394 | plugin->EnablePackage("AOD"); | |
395 | plugin->EnablePackage("ANALYSIS"); | |
396 | plugin->EnablePackage("ANALYSISalice"); | |
397 | } | |
f59ecfbc | 398 | |
399 | // Declare the analysis source files names separated by blancs. To be compiled runtime | |
400 | // using ACLiC on the worker nodes. | |
401 | // Declare all libraries (other than the default ones for the framework. These will be | |
402 | // loaded by the generated analysis macro. Add all extra files (task .cxx/.h) here. | |
bf90a869 | 403 | plugin->AddIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TRD"); |
574b2e7b | 404 | |
9bdd18e3 | 405 | plugin->SetAdditionalLibs("libCORRFW.so libTENDER.so libPWG0base.so libPWG0dep.so libPWG0selectors.so libPWG1.so libPWG2.so \ |
574b2e7b | 406 | libPWG2forward.so libEMCALUtils.so libPWG4PartCorrBase.so libPWG4PartCorrDep.so \ |
bf90a869 | 407 | libPWG3base.so libPWG3muon.so libPWG3muondep.so"); |
f59ecfbc | 408 | |
409 | // Declare the output file names separated by blancs. | |
410 | // (can be like: file.root or file.root@ALICE::Niham::File) | |
411 | plugin->SetDefaultOutputs(); | |
35b82dbf | 412 | plugin->SetMaxMergeFiles(maxMergeFiles); |
f59ecfbc | 413 | plugin->SetNrunsPerMaster(1); |
f59ecfbc | 414 | |
415 | // Put default output files to archive | |
f59ecfbc | 416 | AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager(); |
417 | TIter next(mgr->GetOutputs()); | |
418 | AliAnalysisDataContainer *output; | |
574b2e7b | 419 | if (!mergeExcludes.IsNull()) plugin->SetMergeExcludes(mergeExcludes); |
9bdd18e3 | 420 | if (!terminateFiles.IsNull()) plugin->SetTerminateFiles(terminateFiles); |
f59ecfbc | 421 | // Set friends |
f59ecfbc | 422 | // Optionally set a name for the generated analysis macro (default MyAnalysis.C) |
fe0275ad | 423 | plugin->SetAnalysisMacro(Form("%s.C", train_name.Data())); |
9bdd18e3 | 424 | // Optionally set a name for the generated validation script |
425 | plugin->SetValidationScript("validation.sh"); | |
f59ecfbc | 426 | // Optionally set maximum number of input files/subjob (default 100, put 0 to ignore) |
9bdd18e3 | 427 | plugin->SetSplitMaxInputFileNumber(grid_split); |
f59ecfbc | 428 | // Optionally set number of failed jobs that will trigger killing waiting sub-jobs. |
429 | // plugin->SetMaxInitFailed(5); | |
9bdd18e3 | 430 | // Optionally modify the number of replicas |
431 | plugin->SetNumberOfReplicas(4); | |
f59ecfbc | 432 | // Optionally resubmit threshold. |
433 | // plugin->SetMasterResubmitThreshold(90); | |
434 | // Optionally set time to live (default 30000 sec) | |
435 | plugin->SetTTL(70000); | |
436 | // Optionally set input format (default xml-single) | |
437 | plugin->SetInputFormat("xml-single"); | |
438 | // Optionally modify the name of the generated JDL (default analysis.jdl) | |
fe0275ad | 439 | plugin->SetJDLName(Form("%s.jdl", train_name.Data())); |
f59ecfbc | 440 | // Optionally modify the executable name (default analysis.sh) |
fe0275ad | 441 | plugin->SetExecutable(Form("%s.sh", train_name.Data())); |
f59ecfbc | 442 | // Optionally modify job price (default 1) |
443 | plugin->SetPrice(1); | |
444 | // Optionally modify split mode (default 'se') | |
445 | plugin->SetSplitMode("se"); | |
446 | plugin->SetExecutableCommand("aliroot -b -q"); | |
574b2e7b | 447 | // Merge via JDL |
448 | plugin->SetMergeViaJDL(useMergeViaJDL); | |
449 | // Use fastread option | |
450 | plugin->SetFastReadOption(useFastReadOption); | |
451 | // UseOverwrite mode | |
452 | plugin->SetOverwriteMode(useOverwriteMode); | |
9bdd18e3 | 453 | /********************************************************* |
454 | *** PROOF MODE SPECIFIC SETTINGS ************ | |
455 | *********************************************************/ | |
456 | // Proof cluster | |
457 | // plugin->SetProofCluster("alice-caf"); | |
458 | plugin->SetProofCluster("skaf.saske.sk"); | |
459 | // Dataset to be used | |
460 | plugin->SetProofDataSet("/alice/data/LHC10e_000128175_p1#esdTree"); | |
461 | // May need to reset proof. Supported modes: 0-no reset, 1-soft, 2-hard | |
462 | plugin->SetProofReset(0); | |
463 | // May limit number of workers | |
35b82dbf | 464 | plugin->SetNproofWorkers(1); |
9bdd18e3 | 465 | // May use a specific version of root installed in proof |
466 | plugin->SetRootVersionForProof("current_dbg"); | |
467 | // May set the aliroot mode. Check http://aaf.cern.ch/node/83 | |
468 | plugin->SetAliRootMode("ALIROOT"); // Loads AF libs by default | |
469 | // May request ClearPackages (individual ClearPackage not supported) | |
470 | plugin->SetClearPackages(kFALSE); | |
471 | // Plugin test mode works only providing a file containing test file locations | |
472 | plugin->SetFileForTestMode(gSystem->ExpandPathName("$ALICE_ROOT/PWG1/PilotTrain/files.txt")); | |
f59ecfbc | 473 | return plugin; |
474 | } |