]> git.uio.no Git - u/mrichter/AliRoot.git/blame - test/vmctest/scripts/efficiency/runALICE.C
previous fix adjuested
[u/mrichter/AliRoot.git] / test / vmctest / scripts / efficiency / runALICE.C
CommitLineData
b2cf7207 1void runALICE(TString mode="local",
2 TString analysisMode="full",
3 Bool_t useMC = kTRUE,
4 Int_t nEvents=1.0*1e6,
5 Int_t nEventsSkip=0,
6 TString format="esd") {
7
8 gSystem->Load("libTree.so");
9 gSystem->Load("libGeom.so");
10 gSystem->Load("libVMC.so");
11 gSystem->Load("libPhysics.so");
12 gSystem->Load("libSTEERBase.so");
13 gSystem->Load("libESD.so");
14 gSystem->Load("libAOD.so");
15
16 gSystem->Load("libANALYSIS.so");
17 gSystem->Load("libANALYSISalice.so");
18 gSystem->Load("libCORRFW.so");
19
20
21 // Create and configure the alien handler plugin
22 gROOT->LoadMacro("SetupAnalysis.C");
23 SetupAnalysis(mode.Data(),
24 analysisMode.Data(),
25 useMC,
26 nEvents,
27 nEventsSkip,
28 format.Data());
29
30}
31
32Int_t setupPar(const char* pararchivename) {
33 ///////////////////
34 // Setup PAR File//
35 ///////////////////
36 if (pararchivename) {
37 char processline[1024];
38 sprintf(processline,".! tar xzf %s.par",pararchivename);
39 gROOT->ProcessLine(processline);
40 const char* ocwd = gSystem->WorkingDirectory();
41 gSystem->ChangeDirectory(pararchivename);
42
43 // check for BUILD.sh and execute
44 if (!gSystem->AccessPathName("PROOF-INF/BUILD.sh")) {
45 // printf("*******************************\n");
46 // printf("*** Building PAR archive ***\n");
47 // printf("*******************************\n");
48
49 if (gSystem->Exec("PROOF-INF/BUILD.sh")) {
50 Error("runAnalysis","Cannot Build the PAR Archive! - Abort!");
51 return -1;
52 }
53 }
54 // check for SETUP.C and execute
55 if (!gSystem->AccessPathName("PROOF-INF/SETUP.C")) {
56 // printf("*******************************\n");
57 // printf("*** Setup PAR archive ***\n");
58 // printf("*******************************\n");
59 gROOT->Macro("PROOF-INF/SETUP.C");
60 }
61
62 gSystem->ChangeDirectory("../");
63 }
64 return 1;
65}