]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/RICHpadtestC.C
Latest version
[u/mrichter/AliRoot.git] / RICH / RICHpadtestC.C
1 Int_t diaglevel=2;         // 1->Hits, 2->Spectra, 3->Statistics 
2
3
4 void RICHpadtestC (Int_t evNumber1=0,Int_t evNumber2=0) 
5 {
6 /////////////////////////////////////////////////////////////////////////
7 //   This macro is a small example of a ROOT macro
8 //   illustrating how to read the output of GALICE
9 //   and do some analysis.
10 //   
11 /////////////////////////////////////////////////////////////////////////
12
13
14 // Dynamically link some shared libs
15  
16     if (gClassTable->GetID("AliRun") < 0) {
17       gROOT->LoadMacro("loadlibs.C");
18       loadlibs();
19     }
20     else {
21       //delete gAlice;
22       gAlice = 0;
23     }
24
25     gAlice=0;
26     
27 // Connect the Root Galice file containing Geometry, Kine and Hits
28     
29     TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
30     if (!file) file = new TFile("galice.root","UPDATE");
31     
32 // Get AliRun object from file or create it if not on file
33     
34     if (!gAlice) {
35       gAlice = (AliRun*)file->Get("gAlice");
36       if (gAlice) printf("AliRun object found on file\n");
37       if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
38     }
39     else {
40       delete gAlice;
41       gAlice = (AliRun*)file->Get("gAlice");
42       if (gAlice) printf("AliRun object found on file\n");
43       if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
44     }
45
46
47     // Get pointers to RICH detector and Hits containers
48        
49     AliRICH *RICH  = (AliRICH*)gAlice->GetDetector("RICH");
50     
51     RICH->DiagnosticsFE(evNumber1,evNumber2);
52 }