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