]>
Commit | Line | Data |
---|---|---|
ac0df193 | 1 | void SetupPar(char* pararchivename) |
2 | { | |
3 | //Load par files, create analysis libraries | |
4 | //For testing, if par file already decompressed and modified | |
5 | //classes then do not decompress. | |
6 | ||
7 | TString parpar(Form("%s.par", pararchivename)) ; | |
8 | ||
9 | if ( gSystem->AccessPathName(pararchivename) ) { | |
10 | TString processline = Form(".! tar xvzf %s",parpar.Data()) ; | |
11 | gROOT->ProcessLine(processline.Data()); | |
12 | } | |
13 | ||
14 | TString ocwd = gSystem->WorkingDirectory(); | |
15 | gSystem->ChangeDirectory(pararchivename); | |
16 | ||
17 | // check for BUILD.sh and execute | |
18 | if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) { | |
19 | printf("*******************************\n"); | |
20 | printf("*** Building PAR archive ***\n"); | |
21 | cout<<pararchivename<<endl; | |
22 | printf("*******************************\n"); | |
23 | ||
24 | if (gSystem->Exec("PROOF-INF/BUILD.sh")) { | |
25 | Error("runProcess","Cannot Build the PAR Archive! - Abort!"); | |
26 | return -1; | |
27 | } | |
28 | } | |
29 | // check for SETUP.C and execute | |
30 | if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) { | |
31 | printf("*******************************\n"); | |
32 | printf("*** Setup PAR archive ***\n"); | |
33 | cout<<pararchivename<<endl; | |
34 | printf("*******************************\n"); | |
35 | gROOT->Macro("PROOF-INF/SETUP.C"); | |
36 | } | |
37 | ||
38 | gSystem->ChangeDirectory(ocwd.Data()); | |
39 | printf("Current dir: %s\n", ocwd.Data()); | |
40 | } |