Few mods (Boris)
[u/mrichter/AliRoot.git] / PWG2 / AnalysisMacros / Proof / runAnalysis.C
1 void runAnalysis() {
2   TStopwatch timer;
3   timer.Start();
4   
5   gSystem->AddIncludePath("-I\"$ALICE_ROOT/include\"");
6   printf("****** Connect to PROOF *******\n");
7   TProof::Open("proof://<username>@lxb6046.cern.ch"); 
8
9   // Enable the Analysis Package
10   gProof->UploadPackage("ESD.par");
11   gProof->EnablePackage("ESD");
12   gProof->UploadPackage("AOD.par");
13   gProof->EnablePackage("AOD");
14   gProof->UploadPackage("ANALYSIS.par");
15   gProof->EnablePackage("ANALYSIS");
16
17   gProof->GetManager()->ShowROOTVersions();
18   gProof->ShowEnabledPackages();
19
20   // You should get this macro and the txt file from:
21   // http://aliceinfo.cern.ch/Offline/Analysis/CAF/
22   gROOT->LoadMacro("CreateESDChain.C");
23   TChain* chain = 0x0;
24   chain = CreateESDChain("ESD1.txt",100);
25
26   gROOT->LoadMacro("AliAnalysisTaskPt.cxx+");
27   gProof->Load("AliAnalysisTaskPt.cxx+");
28   gROOT->LoadMacro("demoCAF.C");
29   demoCAF(chain,"proof");
30  
31   gSystem->Exec("rm -rf ESD ANALYSIS");
32
33   timer.Stop();
34   timer.Print();
35 }