improve user interface
[u/mrichter/AliRoot.git] / PWG2 / runProtonAnalysisQA.C
CommitLineData
9e2392b0 1void runProtonAnalysisQA(const char *analysisType = "TPC") {
2 //Macro to run the proton QA analysis tested for local, proof & GRID.
3 //Proof: Takes three arguments, the number of events, the dataset name
4 // and the analysis type
5 //Interactive: Takes two arguments, the name of the collection file with
6 // the event list for each file and the analysis type
1b309669 7 //Batch: Takes two arguments, the name of the collection file with
8 // the ESDs and the analysis type
9e2392b0 9 //Analysis type can be one of the three: "TPC", "Hybrid", "Global"
7b59a00b 10 TStopwatch timer;
11 timer.Start();
12
1b309669 13 //runProof(200000,"/COMMON/COMMON/LHC08c11_10TeV_0.5T",analysisType);
9e2392b0 14 //runInteractive("wn.xml",analysisType);
75decd62 15 //runBatch("wn.xml",analysisType);
16 runLocal(analysisType);
17
7b59a00b 18 timer.Stop();
19 timer.Print();
20}
21
22//_________________________________________________//
75decd62 23void runLocal(const char* analysisType) {
24 TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
25 outputFilename1 += ".root"; //main QA file
26 TString outputFilename2 = "Protons.MC.QA."; outputFilename2 += analysisType;
27 outputFilename2 += ".root"; //MC process QA
28 TString outputFilename3 = "Protons.QA.Histograms.";
29 outputFilename3 += analysisType;
30 outputFilename3 += ".root"; //Accepted cut distributions
31 TString outputFilename4 = "Protons.Efficiency.";
32 outputFilename4 += analysisType;
33 outputFilename4 += ".root"; //Reco and PID efficiency
34 TString outputFilename5 = "Vertex.QA.root"; //vertex QA
35
36 gSystem->Load("libProofPlayer.so");
37
38 //Setup the par files
39 setupPar("STEERBase");
40 gSystem->Load("libSTEERBase.so");
41 setupPar("ESD");
42 gSystem->Load("libESD.so");
43 setupPar("AOD");
44 gSystem->Load("libAOD.so");
45 setupPar("ANALYSIS");
46 gSystem->Load("libANALYSIS.so");
47 setupPar("ANALYSISalice");
48 gSystem->Load("libANALYSISalice.so");
49 setupPar("CORRFW");
50 gSystem->Load("libCORRFW.so");
51 setupPar("PWG2spectra");
52 gSystem->Load("libPWG2spectra.so");
53
54 gROOT->LoadMacro("AliAnalysisTaskProtonsQA.cxx+");
55 //____________________________________________//
56 //Create the chain from the xml collection of esd files
57 TChain *chain = new TChain("esdTree");
58 chain->Add("AliESDs.root");
59
60 //____________________________________________//
61 // Make the analysis manager
62 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
63 AliVEventHandler* esdH = new AliESDInputHandler;
64 mgr->SetInputEventHandler(esdH);
65 AliMCEventHandler *mc = new AliMCEventHandler();
66 mgr->SetMCtruthEventHandler(mc);
67
68 //____________________________________________//
69 // 1st Proton task
70 AliAnalysisTaskProtonsQA *taskProtonsQA = new AliAnalysisTaskProtonsQA("TaskProtonsQA");
71 taskProtonsQA->SetTriggerMode(AliAnalysisTaskProtonsQA::kMB2);
72 switch(analysisType) {
73 case "TPC":
74 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kTPC);
75 break;
76 case "Hybrid":
77 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kHybrid);
78 break;
79 case "Global":
80 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kGlobal);
81 break;
82 default:
83 break;
84 }
85 taskProtonsQA->SetAcceptedVertexDiamond(5.,5.,15.);
86 mgr->AddTask(taskProtonsQA);
87
88 // Create containers for input/output
89 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("dataChain",
90 TChain::Class(),
91 AliAnalysisManager::kInputContainer);
92 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("globalQAList",
93 TList::Class(),
94 AliAnalysisManager::kOutputContainer,
95 outputFilename1.Data());
96 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("pdgCodeList",
97 TList::Class(),
98 AliAnalysisManager::kOutputContainer,
99 outputFilename2.Data());
100 AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("mcProcessList",
101 TList::Class(),
102 AliAnalysisManager::kOutputContainer,
103 outputFilename2.Data());
104 AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("acceptedCutList",
105 TList::Class(),
106 AliAnalysisManager::kOutputContainer,
107 outputFilename3.Data());
108 AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("acceptedDCAList",
109 TList::Class(),
110 AliAnalysisManager::kOutputContainer,
111 outputFilename3.Data());
112 AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("efficiencyList",
113 TList::Class(),
114 AliAnalysisManager::kOutputContainer,
115 outputFilename4.Data());
116 AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("vertexList",
117 TList::Class(),
118 AliAnalysisManager::kOutputContainer,
119 outputFilename5.Data());
120
121 //____________________________________________//
122 mgr->ConnectInput(taskProtonsQA,0,cinput1);
123 mgr->ConnectOutput(taskProtonsQA,0,coutput1);
124 mgr->ConnectOutput(taskProtonsQA,1,coutput2);
125 mgr->ConnectOutput(taskProtonsQA,2,coutput3);
126 mgr->ConnectOutput(taskProtonsQA,3,coutput4);
127 mgr->ConnectOutput(taskProtonsQA,4,coutput5);
128 mgr->ConnectOutput(taskProtonsQA,5,coutput6);
129 mgr->ConnectOutput(taskProtonsQA,6,coutput7);
130 if (!mgr->InitAnalysis()) return;
131 mgr->PrintStatus();
132 mgr->StartAnalysis("local",chain);
133}
134
135//_________________________________________________//
1b309669 136void runBatch(const char *collectionfile,
137 const char *analysisType) {
138 TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
139 outputFilename1 += ".root"; //main QA file
140 TString outputFilename2 = "Protons.MC.QA."; outputFilename2 += analysisType;
141 outputFilename2 += ".root"; //MC process QA
142 TString outputFilename3 = "Protons.QA.Histograms.";
143 outputFilename3 += analysisType;
144 outputFilename3 += ".root"; //Accepted cut distributions
145 TString outputFilename4 = "Protons.Efficiency.";
146 outputFilename4 += analysisType;
147 outputFilename4 += ".root"; //Reco and PID efficiency
75decd62 148 TString outputFilename5 = "Vertex.QA.root"; //vertex QA
1b309669 149
150 TGrid::Connect("alien://");
151 gSystem->Load("libProofPlayer.so");
152
153 //Setup the par files
154 setupPar("STEERBase");
155 gSystem->Load("libSTEERBase.so");
156 setupPar("ESD");
157 gSystem->Load("libESD.so");
158 setupPar("AOD");
159 gSystem->Load("libAOD.so");
160 setupPar("ANALYSIS");
161 gSystem->Load("libANALYSIS.so");
162 setupPar("ANALYSISalice");
163 gSystem->Load("libANALYSISalice.so");
164 setupPar("CORRFW");
165 gSystem->Load("libCORRFW.so");
166 setupPar("PWG2spectra");
167 gSystem->Load("libPWG2spectra.so");
168
169 gROOT->LoadMacro("AliAnalysisTaskProtonsQA.cxx+");
170 //____________________________________________//
171 //Create the chain from the xml collection of esd files
172 TAlienCollection* coll = TAlienCollection::Open(collectionfile);
173 TGridResult* gridResult = coll->GetGridResult("",0,0);
174 Int_t nEntries = gridResult->GetEntries();
175 TChain *chain = new TChain("esdTree");
176 TString alienUrl = 0;
177 for(Int_t i = 0; i < nEntries; i++) {
178 alienUrl = gridResult->GetKey(i,"turl");
179 chain->Add(alienUrl);
180 }
181
182 //____________________________________________//
183 // Make the analysis manager
184 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
185 AliVEventHandler* esdH = new AliESDInputHandler;
186 mgr->SetInputEventHandler(esdH);
187 AliMCEventHandler *mc = new AliMCEventHandler();
188 mgr->SetMCtruthEventHandler(mc);
189
190 //____________________________________________//
191 // 1st Proton task
192 AliAnalysisTaskProtonsQA *taskProtonsQA = new AliAnalysisTaskProtonsQA("TaskProtonsQA");
193 taskProtonsQA->SetTriggerMode(AliAnalysisTaskProtonsQA::kMB2);
194 switch(analysisType) {
195 case "TPC":
196 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kTPC);
197 break;
198 case "Hybrid":
199 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kHybrid);
200 break;
201 case "Global":
202 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kGlobal);
203 break;
204 default:
205 break;
206 }
207 taskProtonsQA->SetAcceptedVertexDiamond(5.,5.,15.);
208 mgr->AddTask(taskProtonsQA);
209
210 // Create containers for input/output
211 AliAnalysisDataContainer *cinput1 = mgr->CreateContainer("dataChain",
212 TChain::Class(),
213 AliAnalysisManager::kInputContainer);
214 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("globalQAList",
215 TList::Class(),
216 AliAnalysisManager::kOutputContainer,
217 outputFilename1.Data());
218 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("pdgCodeList",
219 TList::Class(),
220 AliAnalysisManager::kOutputContainer,
221 outputFilename2.Data());
222 AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("mcProcessList",
223 TList::Class(),
224 AliAnalysisManager::kOutputContainer,
225 outputFilename2.Data());
226 AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("acceptedCutList",
227 TList::Class(),
228 AliAnalysisManager::kOutputContainer,
229 outputFilename3.Data());
230 AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("acceptedDCAList",
231 TList::Class(),
232 AliAnalysisManager::kOutputContainer,
233 outputFilename3.Data());
234 AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("efficiencyList",
235 TList::Class(),
236 AliAnalysisManager::kOutputContainer,
237 outputFilename4.Data());
75decd62 238 AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("vertexList",
239 TList::Class(),
240 AliAnalysisManager::kOutputContainer,
241 outputFilename5.Data());
1b309669 242
243 //____________________________________________//
244 mgr->ConnectInput(taskProtonsQA,0,cinput1);
245 mgr->ConnectOutput(taskProtonsQA,0,coutput1);
246 mgr->ConnectOutput(taskProtonsQA,1,coutput2);
247 mgr->ConnectOutput(taskProtonsQA,2,coutput3);
248 mgr->ConnectOutput(taskProtonsQA,3,coutput4);
249 mgr->ConnectOutput(taskProtonsQA,4,coutput5);
250 mgr->ConnectOutput(taskProtonsQA,5,coutput6);
75decd62 251 mgr->ConnectOutput(taskProtonsQA,6,coutput7);
1b309669 252 if (!mgr->InitAnalysis()) return;
253 mgr->PrintStatus();
254 mgr->StartAnalysis("local",chain);
255}
256
257//_________________________________________________//
9e2392b0 258void runInteractive(const char *collectionfile,
259 const char *analysisType) {
260 TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
261 outputFilename1 += ".root"; //main QA file
262 TString outputFilename2 = "Protons.MC.QA."; outputFilename2 += analysisType;
263 outputFilename2 += ".root"; //MC process QA
264 TString outputFilename3 = "Protons.QA.Histograms.";
265 outputFilename3 += analysisType;
266 outputFilename3 += ".root"; //Accepted cut distributions
267 TString outputFilename4 = "Protons.Efficiency.";
268 outputFilename4 += analysisType;
269 outputFilename4 += ".root"; //Reco and PID efficiency
75decd62 270 TString outputFilename5 = "Vertex.QA.root"; //vertex QA
e2f97a75 271
272 TGrid::Connect("alien://");
273
274 //Setup the par files
275 setupPar("STEERBase");
276 gSystem->Load("libSTEERBase.so");
277 setupPar("ESD");
278 gSystem->Load("libESD.so");
279 setupPar("AOD");
280 gSystem->Load("libAOD.so");
281 setupPar("ANALYSIS");
282 gSystem->Load("libANALYSIS.so");
283 setupPar("ANALYSISalice");
284 gSystem->Load("libANALYSISalice.so");
285 setupPar("CORRFW");
286 gSystem->Load("libCORRFW.so");
287 setupPar("PWG2spectra");
288 gSystem->Load("libPWG2spectra.so");
289
290 gROOT->LoadMacro("AliAnalysisTaskProtonsQA.cxx+");
291 //____________________________________________//
292 //Usage of event tags
293 AliTagAnalysis *analysis = new AliTagAnalysis();
294 TChain *chain = 0x0;
295 chain = analysis->GetChainFromCollection(collectionfile,"esdTree");
296
297 //____________________________________________//
298 // Make the analysis manager
299 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
300 AliVEventHandler* esdH = new AliESDInputHandler;
301 mgr->SetInputEventHandler(esdH);
302 AliMCEventHandler *mc = new AliMCEventHandler();
303 mgr->SetMCtruthEventHandler(mc);
7b59a00b 304
e2f97a75 305 //____________________________________________//
306 // 1st Proton task
307 AliAnalysisTaskProtonsQA *taskProtonsQA = new AliAnalysisTaskProtonsQA("TaskProtonsQA");
5429dd65 308 taskProtonsQA->SetTriggerMode(AliAnalysisTaskProtonsQA::kMB2);
9e2392b0 309 switch(analysisType) {
310 case "TPC":
311 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kTPC);
312 break;
313 case "Hybrid":
314 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kHybrid);
315 break;
316 case "Global":
317 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kGlobal);
318 break;
319 default:
320 break;
321 }
5429dd65 322 taskProtonsQA->SetAcceptedVertexDiamond(5.,5.,15.);
e2f97a75 323 mgr->AddTask(taskProtonsQA);
324
325 // Create containers for input/output
8a546c82 326 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
e2f97a75 327 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("globalQAList",
328 TList::Class(),
329 AliAnalysisManager::kOutputContainer,
330 outputFilename1.Data());
331 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("pdgCodeList",
332 TList::Class(),
333 AliAnalysisManager::kOutputContainer,
334 outputFilename2.Data());
335 AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("mcProcessList",
336 TList::Class(),
337 AliAnalysisManager::kOutputContainer,
338 outputFilename2.Data());
339 AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("acceptedCutList",
340 TList::Class(),
341 AliAnalysisManager::kOutputContainer,
342 outputFilename3.Data());
343 AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("acceptedDCAList",
344 TList::Class(),
345 AliAnalysisManager::kOutputContainer,
346 outputFilename3.Data());
347 AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("efficiencyList",
348 TList::Class(),
349 AliAnalysisManager::kOutputContainer,
350 outputFilename4.Data());
75decd62 351 AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("vertexList",
352 TList::Class(),
353 AliAnalysisManager::kOutputContainer,
354 outputFilename5.Data());
e2f97a75 355
356 //____________________________________________//
357 mgr->ConnectInput(taskProtonsQA,0,cinput1);
358 mgr->ConnectOutput(taskProtonsQA,0,coutput1);
359 mgr->ConnectOutput(taskProtonsQA,1,coutput2);
360 mgr->ConnectOutput(taskProtonsQA,2,coutput3);
361 mgr->ConnectOutput(taskProtonsQA,3,coutput4);
362 mgr->ConnectOutput(taskProtonsQA,4,coutput5);
363 mgr->ConnectOutput(taskProtonsQA,5,coutput6);
75decd62 364 mgr->ConnectOutput(taskProtonsQA,6,coutput7);
e2f97a75 365 if (!mgr->InitAnalysis()) return;
366 mgr->PrintStatus();
367 mgr->StartAnalysis("local",chain);
368}
369
370//_________________________________________________//
9e2392b0 371void runProof(Int_t stats = 0,
372 const char* dataset = 0x0,
373 const char *analysisType) {
374 TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
375 outputFilename1 += ".root"; //main QA file
376 TString outputFilename2 = "Protons.MC.QA."; outputFilename2 += analysisType;
377 outputFilename2 += ".root"; //MC process QA
378 TString outputFilename3 = "Protons.QA.Histograms.";
379 outputFilename3 += analysisType;
380 outputFilename3 += ".root"; //Accepted cut distributions
381 TString outputFilename4 = "Protons.Efficiency.";
382 outputFilename4 += analysisType;
383 outputFilename4 += ".root"; //Reco and PID efficiency
75decd62 384 TString outputFilename5 = "Vertex.QA.root"; //vertex QA
7b59a00b 385
386 printf("****** Connect to PROOF *******\n");
96f84c25 387 TProof::Open("alicecaf.cern.ch");
7b59a00b 388 gProof->SetParallel();
389
390 // Enable the Analysis Package
391 gProof->UploadPackage("STEERBase.par");
392 gProof->EnablePackage("STEERBase");
393 gProof->UploadPackage("ESD.par");
394 gProof->EnablePackage("ESD");
395 gProof->UploadPackage("AOD.par");
396 gProof->EnablePackage("AOD");
397 gProof->UploadPackage("ANALYSIS.par");
398 gProof->EnablePackage("ANALYSIS");
399 gProof->UploadPackage("ANALYSISalice.par");
400 gProof->EnablePackage("ANALYSISalice");
f99662ca 401 gProof->UploadPackage("CORRFW.par");
402 gProof->EnablePackage("CORRFW");
7b59a00b 403 gProof->UploadPackage("PWG2spectra.par");
404 gProof->EnablePackage("PWG2spectra");
405
406 gProof->Load("AliAnalysisTaskProtonsQA.cxx++");
407
408 //____________________________________________//
409 // Make the analysis manager
410 AliAnalysisManager *mgr = new AliAnalysisManager("TestManager");
411 AliVEventHandler* esdH = new AliESDInputHandler;
412 mgr->SetInputEventHandler(esdH);
413 AliMCEventHandler *mc = new AliMCEventHandler();
414 mgr->SetMCtruthEventHandler(mc);
415
416 //____________________________________________//
417 // 1st Proton task
418 AliAnalysisTaskProtonsQA *taskProtonsQA = new AliAnalysisTaskProtonsQA("TaskProtonsQA");
5429dd65 419 taskProtonsQA->SetTriggerMode(AliAnalysisTaskProtonsQA::kMB2);
9e2392b0 420 switch(analysisType) {
421 case "TPC":
422 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kTPC);
423 break;
424 case "Hybrid":
425 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kHybrid);
426 break;
427 case "Global":
428 taskProtonsQA->SetAnalysisMode(AliAnalysisTaskProtonsQA::kGlobal);
429 break;
430 default:
431 break;
432 }
5429dd65 433 taskProtonsQA->SetAcceptedVertexDiamond(5.,5.,15.);
7b59a00b 434 mgr->AddTask(taskProtonsQA);
435
436 // Create containers for input/output
8a546c82 437 AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
5b8133c7 438 AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("globalQAList",
f99662ca 439 TList::Class(),
440 AliAnalysisManager::kOutputContainer,
d4733690 441 outputFilename1.Data());
5b8133c7 442 AliAnalysisDataContainer *coutput2 = mgr->CreateContainer("pdgCodeList",
d4733690 443 TList::Class(),
444 AliAnalysisManager::kOutputContainer,
445 outputFilename2.Data());
5b8133c7 446 AliAnalysisDataContainer *coutput3 = mgr->CreateContainer("mcProcessList",
d4733690 447 TList::Class(),
448 AliAnalysisManager::kOutputContainer,
0008a5a6 449 outputFilename2.Data());
5b8133c7 450 AliAnalysisDataContainer *coutput4 = mgr->CreateContainer("acceptedCutList",
451 TList::Class(),
452 AliAnalysisManager::kOutputContainer,
453 outputFilename3.Data());
454 AliAnalysisDataContainer *coutput5 = mgr->CreateContainer("acceptedDCAList",
455 TList::Class(),
456 AliAnalysisManager::kOutputContainer,
457 outputFilename3.Data());
e2f97a75 458 AliAnalysisDataContainer *coutput6 = mgr->CreateContainer("efficiencyList",
459 TList::Class(),
460 AliAnalysisManager::kOutputContainer,
461 outputFilename4.Data());
75decd62 462 AliAnalysisDataContainer *coutput7 = mgr->CreateContainer("vertexList",
463 TList::Class(),
464 AliAnalysisManager::kOutputContainer,
465 outputFilename5.Data());
7b59a00b 466
467 //____________________________________________//
468 mgr->ConnectInput(taskProtonsQA,0,cinput1);
469 mgr->ConnectOutput(taskProtonsQA,0,coutput1);
d4733690 470 mgr->ConnectOutput(taskProtonsQA,1,coutput2);
471 mgr->ConnectOutput(taskProtonsQA,2,coutput3);
5b8133c7 472 mgr->ConnectOutput(taskProtonsQA,3,coutput4);
473 mgr->ConnectOutput(taskProtonsQA,4,coutput5);
e2f97a75 474 mgr->ConnectOutput(taskProtonsQA,5,coutput6);
75decd62 475 mgr->ConnectOutput(taskProtonsQA,6,coutput7);
7b59a00b 476 if (!mgr->InitAnalysis()) return;
477 mgr->PrintStatus();
478
479 if(dataset)
480 mgr->StartAnalysis("proof",dataset,stats);
481 else {
482 // You should get this macro and the txt file from:
483 // http://aliceinfo.cern.ch/Offline/Analysis/CAF/
484 gROOT->LoadMacro("CreateESDChain.C");
485 TChain* chain = 0x0;
486 chain = CreateESDChain("ESD82XX_30K.txt",stats);
487 chain->SetBranchStatus("*Calo*",0);
488
489 mgr->StartAnalysis("proof",chain);
f99662ca 490 //mgr->StartAnalysis("local",chain);
7b59a00b 491 }
7b59a00b 492}
493
494//_________________________________________________//
495Int_t setupPar(const char* pararchivename) {
496 ///////////////////
497 // Setup PAR File//
498 ///////////////////
499 if (pararchivename) {
500 char processline[1024];
501 sprintf(processline,".! tar xvzf %s.par",pararchivename);
1b309669 502 gROOT->ProcessLine(processline);
7b59a00b 503 const char* ocwd = gSystem->WorkingDirectory();
504 gSystem->ChangeDirectory(pararchivename);
505
506 // check for BUILD.sh and execute
507 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
508 printf("*******************************\n");
509 printf("*** Building PAR archive ***\n");
510 printf("*******************************\n");
511
512 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
513 Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
514 return -1;
515 }
516 }
517 // check for SETUP.C and execute
518 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
519 printf("*******************************\n");
520 printf("*** Setup PAR archive ***\n");
521 printf("*******************************\n");
522 gROOT->Macro("PROOF-INF/SETUP.C");
523 }
524
525 gSystem->ChangeDirectory("../");
526 }
527 return 1;
528}