]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/SPECTRA/AntiprotonToProton/runProtonsCorrectionAnalysis.C
.so cleanup: removed from gSystem->Load()
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / AntiprotonToProton / runProtonsCorrectionAnalysis.C
1 void runProtonsCorrectionAnalysis(const char* analysisType  = "Hybrid",
2                                   const char* pidMode = "Ratio",
3                                   Bool_t fIsOn_AliProtonAbsorptionCorrection=kTRUE, 
4                                   Bool_t fIsOn_AliProtonFeedDownAnalysis=kFALSE,
5                                   Bool_t fIsOn_AliProtonSpectraCorrection=kFALSE) 
6 {
7   //Macro to run the proton feed-down analysis tested for local, proof & GRID.
8   //Local: Takes four arguments, the analysis mode, the type of the ESD 
9   //       analysis, the PID mode and the path where the tag and ESD or 
10   //       AOD files reside.
11   //Interactive: Takes four arguments, the analysis mode, the type of the ESD 
12   //             analysis, the PID mode and the name of the collection of tag 
13   //             files.
14   //Batch: Takes four arguments, the analysis mode, the type of the ESD 
15   //       analysis, the PID mode and the name of the collection file with 
16   //       the event list for each file.
17   //Proof: Takes five arguments, the analysis level, the analysis mode in 
18   //       case of ESD, the PID mode, the number of events and the dataset 
19   //       name and .  
20   //Analysis mode can be: "MC", "ESD", "AOD"
21   //ESD analysis type can be one of the three: "TPC", "Hybrid", "Global"
22   //PID mode can be one of the four: "Bayesian" (standard Bayesian approach) 
23   //   "Ratio" (ratio of measured over expected/theoretical dE/dx a la STAR) 
24   //   "Sigma1" (N-sigma area around the fitted dE/dx vs P band)
25   //   "Sigma2" (same as previous but taking into account the No of TPC points)
26   TStopwatch timer;
27   timer.Start();
28   
29   //runLocal("ESD",analysisType,pidMode,"/home/pchrist/ALICE/Baryons/Analysis/Protons/Local/data",fIsOn_AliProtonAbsorptionCorrection,fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection);
30   //runInteractive("ESD",analysisType,pidMode,"/home/marek/Analysis/global_xml/tagtest81627.xml",fIsOn_AliProtonAbsorptionCorrection,fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection);
31   //runBatch("ESD",analysisType,pidMode,"wn.xml",fIsOn_AliProtonAbsorptionCorrection,fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection);  
32   runProof("ESD",analysisType,pidMode,500000,"/COMMON/COMMON/LHC10a8_run104867_8#esdTree",fIsOn_AliProtonAbsorptionCorrection,fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection);
33   
34   timer.Stop();
35   timer.Print();
36 }
37
38 //_________________________________________________//
39 void runLocal(const char* mode = "ESD",
40               const char* analysisType = 0x0,
41               const char* pidMode = 0x0, 
42               const char* path = 0x0,
43               Bool_t fIsOn_AliProtonAbsorptionCorrection=kTRUE, 
44               Bool_t fIsOn_AliProtonFeedDownAnalysis=kTRUE,
45               Bool_t fIsOn_AliProtonSpectraCorrection=kTRUE) {
46   TString smode = mode;
47   TString outputFilename = "ProtonCorrection."; outputFilename += mode;
48   if(analysisType) {
49     outputFilename += "."; outputFilename += analysisType;
50   }
51   outputFilename += ".root";
52
53   //____________________________________________________//
54   //_____________Setting up the par files_______________//
55   //____________________________________________________//
56   setupPar("STEERBase");
57   gSystem->Load("libSTEERBase");
58   setupPar("ESD");
59   gSystem->Load("libVMC");
60   gSystem->Load("libESD");
61   setupPar("AOD");
62   gSystem->Load("libAOD");
63   setupPar("ANALYSIS");
64   gSystem->Load("libANALYSIS");
65   setupPar("ANALYSISalice");
66   gSystem->Load("libANALYSISalice");
67   setupPar("CORRFW");
68   gSystem->Load("libCORRFW");
69   setupPar("PWG2spectra");
70   gSystem->Load("libPWG2spectra");
71   //____________________________________________________//  
72   
73   //____________________________________________//
74   AliTagAnalysis *tagAnalysis = new AliTagAnalysis("ESD"); 
75   tagAnalysis->ChainLocalTags(path);
76   
77   AliRunTagCuts *runCuts = new AliRunTagCuts();
78   AliLHCTagCuts *lhcCuts = new AliLHCTagCuts();
79   AliDetectorTagCuts *detCuts = new AliDetectorTagCuts();
80   AliEventTagCuts *evCuts = new AliEventTagCuts();
81   
82   TChain* chain = 0x0;
83   chain = tagAnalysis->QueryTags(runCuts,lhcCuts,detCuts,evCuts);
84   //chain->SetBranchStatus("*Calo*",0);
85   
86   //____________________________________________//
87   // Make the analysis manager
88   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisManagerProtonCorrection");
89   AliVEventHandler* esdH = new AliESDInputHandler;
90   mgr->SetInputEventHandler(esdH);
91   AliMCEventHandler *mc = new AliMCEventHandler();
92   mgr->SetMCtruthEventHandler(mc);
93   
94   //____________________________________________//
95   /*AliProtonCorrectionAnalysisTask *taskProtons = new AliProtonCorrectionAnalysisTask("TaskProtonsProtonCorrection");
96     
97   if(fIsOn_AliProtonAbsorptionCorrection||fIsOn_AliProtonFeedDownAnalysis||fIsOn_AliProtonSpectraCorrection)
98   {
99   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
100   AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,analysisType,pidMode);
101   taskProtons->SetBaseAnalysis(baseAnalysis);
102   }     
103   else
104   return;
105   if(fIsOn_AliProtonAbsorptionCorrection)
106   {
107   AliProtonAbsorptionCorrection * absorptioncorrection=new AliProtonAbsorptionCorrection();
108   taskProtons->SetAnalysisObjectAbsorptionCorrection(absorptioncorrection);
109   }
110   if(fIsOn_AliProtonFeedDownAnalysis)
111   {
112   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonFeedDownAnalysis.C");
113   AliProtonFeedDownAnalysis *analysisFeedDown = GetProtonFeedDownAnalysisObject();
114   taskProtons->SetAnalysisObjectFeedDown(analysisFeedDown);
115   }     
116   if(fIsOn_AliProtonSpectraCorrection)
117   {
118   AliProtonSpectraCorrection* spectracorrection=new AliProtonSpectraCorrection();
119   taskProtons->SetAnalysisObjectSpectraCorrection(spectracorrection);
120   }*/
121   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonCorrectionAnalysisTask.C"); 
122   AliProtonCorrectionAnalysisTask* taskProtons=GetAliProtonCorrectionAnalysisTask(mode,analysisType,pidMode ,fIsOn_AliProtonAbsorptionCorrection, fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection); 
123   mgr->AddTask(taskProtons);
124   
125   // Create containers for input/output
126   AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
127   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("outputList",TList::Class(),AliAnalysisManager::kOutputContainer,outputFilename.Data());
128   
129   //____________________________________________//
130   mgr->ConnectInput(taskProtons,0,cinput1);
131   mgr->ConnectOutput(taskProtons,0,coutput1);
132   if (!mgr->InitAnalysis()) 
133     return;
134   mgr->PrintStatus();
135   mgr->StartAnalysis("local",chain);
136 }
137
138 //_________________________________________________//
139 void runInteractive(const char* mode = "ESD",
140                     const char* analysisType = 0x0,
141                     const char* pidMode = 0x0,
142                     const char* collectionName = "tag.xml",
143                     Bool_t fIsOn_AliProtonAbsorptionCorrection=kTRUE, 
144                     Bool_t fIsOn_AliProtonFeedDownAnalysis=kTRUE,
145                     Bool_t fIsOn_AliProtonSpectraCorrection=kTRUE) {
146   gSystem->Load("libProofPlayer");
147   
148   TString smode = mode;
149   TString outputFilename = "ProtonCorrection."; outputFilename += mode;
150   if(analysisType) {
151     outputFilename += "."; outputFilename += analysisType;
152   }
153   outputFilename += ".root";
154   
155   printf("*** Connect to AliEn ***\n");
156   TGrid::Connect("alien://");
157   
158   //____________________________________________________//
159   //_____________Setting up the par files_______________//
160   //____________________________________________________//
161   setupPar("STEERBase");
162   gSystem->Load("libSTEERBase");
163   setupPar("ESD");
164   gSystem->Load("libVMC");
165   gSystem->Load("libESD");
166   setupPar("AOD");
167   gSystem->Load("libAOD");
168   setupPar("ANALYSIS");
169   gSystem->Load("libANALYSIS");
170   setupPar("ANALYSISalice");
171   gSystem->Load("libANALYSISalice");
172   setupPar("CORRFW");
173   gSystem->Load("libCORRFW");
174   setupPar("PWG2spectra");
175   gSystem->Load("libPWG2spectra");
176   //____________________________________________________//  
177   
178   //____________________________________________//
179   AliTagAnalysis *tagAnalysis = new AliTagAnalysis("ESD");
180   
181   AliRunTagCuts *runCuts = new AliRunTagCuts();
182   AliLHCTagCuts *lhcCuts = new AliLHCTagCuts();
183   AliDetectorTagCuts *detCuts = new AliDetectorTagCuts();
184   AliEventTagCuts *evCuts = new AliEventTagCuts();
185   
186   //grid tags
187   TAlienCollection* coll = TAlienCollection::Open(collectionName);
188   TGridResult* TagResult = coll->GetGridResult("",0,0);
189   tagAnalysis->ChainGridTags(TagResult);
190   TChain* chain = 0x0;
191   chain = tagAnalysis->QueryTags(runCuts,lhcCuts,detCuts,evCuts);
192   //chain->SetBranchStatus("*Calo*",0);
193   
194   //____________________________________________//
195   // Make the analysis manager
196   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisManagerProtonCorrection");
197   AliVEventHandler* esdH = new AliESDInputHandler;
198   mgr->SetInputEventHandler(esdH);
199   AliMCEventHandler *mc = new AliMCEventHandler();
200   mgr->SetMCtruthEventHandler(mc);
201   
202   //____________________________________________//
203   /*AliProtonCorrectionAnalysisTask *taskProtons = new AliProtonCorrectionAnalysisTask("TaskProtonsProtonCorrection");
204     if(fIsOn_AliProtonAbsorptionCorrection||fIsOn_AliProtonFeedDownAnalysis||fIsOn_AliProtonSpectraCorrection)
205     {
206     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
207     AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,analysisType,pidMode);
208     taskProtons->SetBaseAnalysis(baseAnalysis);
209     }   
210     else
211     return;
212     if(fIsOn_AliProtonAbsorptionCorrection)
213     {
214     AliProtonAbsorptionCorrection* absorptioncorrection=new AliProtonAbsorptionCorrection();
215     taskProtons->SetAnalysisObjectAbsorptionCorrection(absorptioncorrection);
216     }
217     if(fIsOn_AliProtonFeedDownAnalysis)
218     {
219     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonFeedDownAnalysis.C");
220     AliProtonFeedDownAnalysis* analysisFeedDown = GetProtonFeedDownAnalysisObject();
221     taskProtons->SetAnalysisObjectFeedDown(analysisFeedDown);
222     }   
223     if(fIsOn_AliProtonSpectraCorrection)
224     {
225     AliProtonSpectraCorrection* spectracorrection=new AliProtonSpectraCorrection();
226     taskProtons->SetAnalysisObjectSpectraCorrection(spectracorrection);
227     }*/
228   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonCorrectionAnalysisTask.C"); 
229   AliProtonCorrectionAnalysisTask* taskProtons=GetAliProtonCorrectionAnalysisTask(mode,analysisType,pidMode ,fIsOn_AliProtonAbsorptionCorrection, fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection); 
230   mgr->AddTask(taskProtons);
231   
232   // Create containers for input/output
233   AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
234   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("outputList",TList::Class(),AliAnalysisManager::kOutputContainer,outputFilename.Data());
235   
236   //____________________________________________//
237   mgr->ConnectInput(taskProtons,0,cinput1);
238   mgr->ConnectOutput(taskProtons,0,coutput1);
239   if (!mgr->InitAnalysis()) 
240     return;
241   mgr->PrintStatus();
242   mgr->StartAnalysis("local",chain);
243 }
244
245 //_________________________________________________//
246 void runBatch(const char* mode = "ESD",
247               const char* analysisType = 0x0,
248               const char* pidMode = 0x0,
249               const char *collectionfile = "wn.xml",
250               Bool_t fIsOn_AliProtonAbsorptionCorrection=kTRUE, 
251               Bool_t fIsOn_AliProtonFeedDownAnalysis=kTRUE,
252               Bool_t fIsOn_AliProtonSpectraCorrection=kTRUE) {
253   TString smode = mode;
254   TString outputFilename = "ProtonCorrection."; outputFilename += mode;
255   if(analysisType) {
256     outputFilename += "."; outputFilename += analysisType;
257   }
258   outputFilename += ".root";
259   
260   printf("*** Connect to AliEn ***\n");
261   TGrid::Connect("alien://");
262   gSystem->Load("libProofPlayer");
263   
264   //____________________________________________________//
265   //_____________Setting up the par files_______________//
266   //____________________________________________________//
267   gSystem->Load("libSTEERBase");
268   gSystem->Load("libESD");
269   gSystem->Load("libAOD");
270   gSystem->Load("libANALYSIS") ;
271   gSystem->Load("libANALYSISalice") ;
272   gSystem->Load("libCORRFW") ;
273   
274   //setupPar("PWG2spectra");
275   gSystem->Load("libPWG2spectra");
276   //____________________________________________________//  
277   
278   //____________________________________________//
279   AliTagAnalysis *tagAnalysis = new AliTagAnalysis("ESD");
280   TChain *chain = 0x0;
281   chain = tagAnalysis->GetChainFromCollection(collectionfile,"esdTree");
282   
283   //____________________________________________//
284   // Make the analysis manager
285   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisManagerProtonCorrection");
286   AliVEventHandler* esdH = new AliESDInputHandler;
287   mgr->SetInputEventHandler(esdH);
288   AliMCEventHandler *mc = new AliMCEventHandler();
289   mgr->SetMCtruthEventHandler(mc);
290   
291   //____________________________________________//
292   /*AliProtonCorrectionAnalysisTask *taskProtons = new AliProtonCorrectionAnalysisTask("TaskProtonsProtonCorrection");
293     if(fIsOn_AliProtonAbsorptionCorrection||fIsOn_AliProtonFeedDownAnalysis||fIsOn_AliProtonSpectraCorrection)
294     {
295     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
296     AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,analysisType ,pidMode);
297     taskProtons->SetBaseAnalysis(baseAnalysis);
298     }   
299     else
300     return;
301     if(fIsOn_AliProtonAbsorptionCorrection)
302     {
303     AliProtonAbsorptionCorrection * absorptioncorrection=new AliProtonAbsorptionCorrection();
304     taskProtons->SetAnalysisObjectAbsorptionCorrection(absorptioncorrection);
305     }
306     if(fIsOn_AliProtonFeedDownAnalysis)
307     {
308     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonFeedDownAnalysis.C");
309     AliProtonFeedDownAnalysis *analysisFeedDown = GetProtonFeedDownAnalysisObject();
310     taskProtons->SetAnalysisObjectFeedDown(analysisFeedDown);
311     }   
312     if(fIsOn_AliProtonSpectraCorrection)
313     {
314     AliProtonSpectraCorrection* spectracorrection=new AliProtonSpectraCorrection();
315     taskProtons->SetAnalysisObjectSpectraCorrection(spectracorrection);
316     }*/
317   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonCorrectionAnalysisTask.C"); 
318   AliProtonCorrectionAnalysisTask* taskProtons=GetAliProtonCorrectionAnalysisTask(mode,analysisType,pidMode ,fIsOn_AliProtonAbsorptionCorrection, fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection); 
319   mgr->AddTask(taskProtons);
320   
321   // Create containers for input/output
322   AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
323   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("outputList",TList::Class(),AliAnalysisManager::kOutputContainer,outputFilename.Data());
324
325   //____________________________________________//
326   mgr->ConnectInput(taskProtons,0,cinput);
327   mgr->ConnectOutput(taskProtons,0,coutput1);
328   if (!mgr->InitAnalysis()) 
329     return;
330   mgr->PrintStatus();
331   mgr->StartAnalysis("local",chain);
332 }
333
334 //_________________________________________________//
335 void runProof(const char* mode = "ESD",
336               const char* analysisType = 0x0,
337               const char* pidMode = 0x0,
338               Int_t stats = 0, 
339               const char* dataset = 0x0,
340               Bool_t fIsOn_AliProtonAbsorptionCorrection=kTRUE, 
341               Bool_t fIsOn_AliProtonFeedDownAnalysis=kTRUE,
342               Bool_t fIsOn_AliProtonSpectraCorrection=kTRUE) {  
343   TString smode = mode;
344   TString outputFilename = "ProtonCorrection."; outputFilename += mode;
345   if(analysisType) {
346     outputFilename += "."; outputFilename += analysisType;
347   }
348   outputFilename += ".root";
349   
350   printf("****** Connect to PROOF *******\n");
351   gEnv->SetValue("XSec.GSI.DelegProxy","2");
352   TProof::Open("alicecaf.cern.ch"); 
353   //gProof->SetParallel();
354   
355   // Enable the Analysis Package
356   gProof->UploadPackage("STEERBase.par");
357   gProof->EnablePackage("STEERBase");
358   gProof->UploadPackage("ESD.par");
359   gProof->EnablePackage("ESD");
360   gProof->UploadPackage("AOD.par");
361   gProof->EnablePackage("AOD");
362   gProof->UploadPackage("ANALYSIS.par");
363   gProof->EnablePackage("ANALYSIS");
364   gProof->UploadPackage("ANALYSISalice.par");
365   gProof->EnablePackage("ANALYSISalice");
366   gProof->UploadPackage("CORRFW.par");
367   gProof->EnablePackage("CORRFW");
368   gProof->UploadPackage("PWG2spectra.par");
369   gProof->EnablePackage("PWG2spectra");
370   //____________________________________________//
371   
372   //____________________________________________//
373   // Make the analysis manager
374   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisManagerProtonCorrection");
375   AliVEventHandler* esdH = new AliESDInputHandler;
376   mgr->SetInputEventHandler(esdH);
377   AliMCEventHandler *mc = new AliMCEventHandler();
378   mgr->SetMCtruthEventHandler(mc);
379   //____________________________________________//
380   //Create the proton task
381   /*AliProtonCorrectionAnalysisTask *taskProtons = new AliProtonCorrectionAnalysisTask("TaskProtonsProtonCorrection");
382     if(fIsOn_AliProtonAbsorptionCorrection||fIsOn_AliProtonFeedDownAnalysis||fIsOn_AliProtonSpectraCorrection)
383     {
384     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
385     AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,analysisType ,pidMode);
386     taskProtons->SetBaseAnalysis(baseAnalysis);
387     }   
388     else
389     return
390     if(fIsOn_AliProtonAbsorptionCorrection)
391     {
392     AliProtonAbsorptionCorrection * absorptioncorrection=new AliProtonAbsorptionCorrection();
393     taskProtons->SetAnalysisObjectAbsorptionCorrection(absorptioncorrection);
394     }
395     if(fIsOn_AliProtonFeedDownAnalysis)
396     {
397     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonFeedDownAnalysis.C");
398     AliProtonFeedDownAnalysis *analysisFeedDown = GetProtonFeedDownAnalysisObject();
399     taskProtons->SetAnalysisObjectFeedDown(analysisFeedDown);
400     }   
401     if(fIsOn_AliProtonSpectraCorrection)
402     {
403     AliProtonSpectraCorrection* spectracorrection=new AliProtonSpectraCorrection();
404     taskProtons->SetAnalysisObjectSpectraCorrection(spectracorrection);
405     }*/
406   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonCorrectionAnalysisTask.C"); 
407   AliProtonCorrectionAnalysisTask* taskProtons=GetAliProtonCorrectionAnalysisTask(mode,analysisType,pidMode ,fIsOn_AliProtonAbsorptionCorrection, fIsOn_AliProtonFeedDownAnalysis, fIsOn_AliProtonSpectraCorrection); 
408   mgr->AddTask(taskProtons);
409   
410   // Create containers for input/output
411   AliAnalysisDataContainer *cinput1 = mgr->GetCommonInputContainer();
412   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("outputList",TList::Class(),AliAnalysisManager::kOutputContainer,outputFilename.Data());
413   
414   //____________________________________________//
415   mgr->ConnectInput(taskProtons,0,cinput1);
416   mgr->ConnectOutput(taskProtons,0,coutput1);
417   if (!mgr->InitAnalysis()) return;
418   mgr->PrintStatus();
419   
420   if(dataset)
421     mgr->StartAnalysis("proof",dataset,stats);
422   else {
423     // You should get this macro and the txt file from:
424     // http://aliceinfo.cern.ch/Offline/Analysis/CAF/
425     gROOT->LoadMacro("CreateESDChain.C");
426     TChain* chain = 0x0;
427     chain = CreateESDChain("ESD82XX_30K.txt",stats);
428     chain->SetBranchStatus("*Calo*",0);
429     
430     mgr->StartAnalysis("proof",chain);
431   }
432 }
433
434 //_________________________________________________//
435 Int_t setupPar(const char* pararchivename) {
436   ///////////////////
437   // Setup PAR File//
438   ///////////////////
439   if (pararchivename) {
440     char processline[1024];
441     sprintf(processline,".! tar xvzf %s.par",pararchivename);
442     gROOT->ProcessLine(processline);
443     const char* ocwd = gSystem->WorkingDirectory();
444     gSystem->ChangeDirectory(pararchivename);
445     
446     // check for BUILD.sh and execute
447     if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
448       printf("*******************************\n");
449       printf("*** Building PAR archive    ***\n");
450       printf("*******************************\n");
451       
452       if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
453         Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
454         return -1;
455       }
456     }
457     // check for SETUP.C and execute
458     if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
459       printf("*******************************\n");
460       printf("*** Setup PAR archive       ***\n");
461       printf("*******************************\n");
462       gROOT->Macro("PROOF-INF/SETUP.C");
463     }
464     
465     gSystem->ChangeDirectory("../");
466   } 
467   return 1;
468 }