]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/RunAnalysis.C
bugfix: boundery check for static hit array
[u/mrichter/AliRoot.git] / PWG3 / RunAnalysis.C
CommitLineData
ccc44bda 1//
2// Example to generate the PWG3base library from a par file
3// par file is created in ALICE_ROOT directory via make PGW3base.par
4// To run the generation of AOD you also need the PWG0base.par file
5// Gines Martinez, Nantes oct 2007
6//
7// Copy the par file to your working directory and execute root
8// .L $ALICE_ROOT/PWG3/RunAnalysis.C
9// setupPar("PWG3base")
10// setupPar("PWG0base")
11// Now you can run you analysis macro
12// .L RunAODGeneration.C
13//
14
15Int_t setupPar(const char* pararchivename) {
16 ///////////////////
17 // Setup PAR File//
18 ///////////////////
19 if (pararchivename) {
20 char processline[1024];
21 sprintf(processline,".! tar xvzf %s.par",pararchivename);
22 gROOT->ProcessLine(processline);
23 const char* ocwd = gSystem->WorkingDirectory();
24 gSystem->ChangeDirectory(pararchivename);
25
26 // check for BUILD.sh and execute
27 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
28 printf("*******************************\n");
29 printf("*** Building PAR archive ***\n");
30 printf("*******************************\n");
31
32 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
33 Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
34 return -1;
35 }
36 }
37 // check for SETUP.C and execute
38 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
39 printf("*******************************\n");
40 printf("*** Setup PAR archive ***\n");
41 printf("*******************************\n");
42 gROOT->Macro("PROOF-INF/SETUP.C");
43 }
44
45 gSystem->ChangeDirectory("../");
46 }
47
48 return 1;
49}