]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG2/FORWARD/analysis2/scripts/LoadPars.C
MB fix for 2.76 TeV
[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 *
f0ef1e71 4 * @ingroup pwg2_forward_scripts
ab0f914c 5 */
01caf91f 6Bool_t
1174780f 7LoadPars(Int_t nWorkers=4)
ab0f914c 8{
fed25682 9 const char* option = nWorkers <= 0 ? "" : Form("workers=%d", nWorkers);
10 TProof::Open(option);
ab0f914c 11 const char* pkgs[] = { "STEERBase", "ESD", "AOD", "ANALYSIS",
12 "ANALYSISalice", "PWG2forward2", 0};
13 const char** pkg = pkgs;
01caf91f 14 Bool_t ret = true;
ab0f914c 15 while (*pkg) {
01caf91f 16 if (gProof->UploadPackage(Form("${ALICE_ROOT}/%s.par",*pkg)) < 0) {
17 Error("LoadPars", "Failed to upload package %s", *pkg);
18 ret = false;
19 continue;
20 }
21 if (gProof->EnablePackage(*pkg) < 0) {
22 Error("LoadPars", "Failed to enable package %s", *pkg);
23 ret = false;
24 continue;
25 }
ab0f914c 26 pkg++;
27 }
01caf91f 28 return ret;
ab0f914c 29}
30//
31// EOF
32//