//============================================================== // This macro is intended to compile 'on the fly' // all the classes for event reading and saving into the // 'AliRsnEvent' format which is needed for analysis. // // Returns an integer error message if some compilation fails. //============================================================== Int_t setupPar(const char* pararchivename, Bool_t unzip=kTRUE) { //////////////////// // Setup PAR File // //////////////////// printf("\n\nSETUPING PAR %s\n\n",pararchivename); gSystem->Exec("g++ -v"); printf("\n\n"); if (pararchivename) { char processline[1024]; sprintf(processline,".! tar xvzf %s.par",pararchivename); if (unzip) gROOT->ProcessLine(processline); const char* ocwd = gSystem->WorkingDirectory(); gSystem->ChangeDirectory(pararchivename); // check for BUILD.sh and execute if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) { printf("*******************************\n"); printf("*** Building PAR archive ***\n"); printf("*******************************\n"); if (gSystem->Exec("PROOF-INF/BUILD.sh")) { Error("runProcess","Cannot Build the PAR Archive! - Abort!"); return -1; } } // check for SETUP.C and execute if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) { printf("*******************************\n"); printf("*** Setup PAR archive ***\n"); printf("*******************************\n"); gROOT->Macro("PROOF-INF/SETUP.C"); } gSystem->ChangeDirectory("../"); } return 1; }