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