]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG2/RESONANCES/macros/tutorial/00/runMyProcess.C
bugfix: misspelled variable
[u/mrichter/AliRoot.git] / PWG2 / RESONANCES / macros / tutorial / 00 / runMyProcess.C
1 void runMyProcess(const char *proofToConnect = "mvala@alicecaf.cern.ch") {
2   // Boolean if the process is running without errors
3   Bool_t isProcessOK = kTRUE;
4
5   // Sets up timer
6   TStopwatch timer;
7   timer.Start();
8
9   // Loads "PWG2resonancesUtils.C" macro, where AliRsnUtils class is defined
10   gROOT->LoadMacro("PWG2resonancesUtils.C");
11
12   // Setting up the proof connection (in this example we will connect to 'alicecaf.cern.ch' with 'mvala' username)
13   TString proof = proofToConnect;
14
15   // Seting up the par-files we will use(without .par extension) and divided by ':'
16   TString pars = "STEERBase:ESD:AOD:ANALYSIS:ANALYSISalice:PWG2resonances";
17
18   // Create utils object which will connect to the proof, loads libraries
19   // and in next tutorials it will sets up inpit files and run analysis
20   AliRsnUtils *utils = new AliRsnUtils(AliRsnUtils::kProof,proof);
21
22   // Cleans all package (leave it uncommented only if you have problem to load parfiles in proof)
23   // so in future tutorial we will comment it, because we don't want to recompile same parfile all the time
24   utils->CleanPackages();
25
26   // Loading pars
27   isProcessOK = utils->LoadPars(pars);
28
29   // if one of the par-file was not load correctly we will stop the macro
30   if (!isProcessOK) return;
31
32   // Prints process time
33   timer.Stop();
34   timer.Print();
35 }