]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/scripts/LoadPars.C
Modifications to Run.sh script
[u/mrichter/AliRoot.git] / PWG2 / FORWARD / analysis2 / scripts / LoadPars.C
CommitLineData
ab0f914c 1/**
2 * Set-up for a PROOF analysis job. Make TProof object and load pars.
3 *
4 */
01caf91f 5Bool_t
1174780f 6LoadPars(Int_t nWorkers=4)
ab0f914c 7{
fed25682 8 const char* option = nWorkers <= 0 ? "" : Form("workers=%d", nWorkers);
9 TProof::Open(option);
ab0f914c 10 const char* pkgs[] = { "STEERBase", "ESD", "AOD", "ANALYSIS",
11 "ANALYSISalice", "PWG2forward2", 0};
12 const char** pkg = pkgs;
01caf91f 13 Bool_t ret = true;
ab0f914c 14 while (*pkg) {
01caf91f 15 if (gProof->UploadPackage(Form("${ALICE_ROOT}/%s.par",*pkg)) < 0) {
16 Error("LoadPars", "Failed to upload package %s", *pkg);
17 ret = false;
18 continue;
19 }
20 if (gProof->EnablePackage(*pkg) < 0) {
21 Error("LoadPars", "Failed to enable package %s", *pkg);
22 ret = false;
23 continue;
24 }
ab0f914c 25 pkg++;
26 }
01caf91f 27 return ret;
ab0f914c 28}
29//
30// EOF
31//