]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/RICHpadtestC.C
GeVSim is a simple Monte-Carlo event generator based on the definition of Star MevSim...
[u/mrichter/AliRoot.git] / RICH / RICHpadtestC.C
CommitLineData
6a748468 1Int_t diaglevel=2; // 1->Hits, 2->Spectra, 3->Statistics
2
3
4void 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
6a748468 14// Dynamically link some shared libs
15
16 if (gClassTable->GetID("AliRun") < 0) {
85f1fa61 17 gROOT->LoadMacro("loadlibs.C");
18 loadlibs();
19 }
20 else {
21 //delete gAlice;
22 gAlice = 0;
6a748468 23 }
6a748468 24
85f1fa61 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
6a748468 32// Get AliRun object from file or create it if not on file
85f1fa61 33
34 if (!gAlice) {
6a748468 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");
85f1fa61 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 }
6a748468 45
59f5e5cd 46
c128dc06 47 // Get pointers to RICH detector and Hits containers
6a748468 48
c128dc06 49 AliRICH *RICH = (AliRICH*)gAlice->GetDetector("RICH");
50
51 RICH->DiagnosticsFE(evNumber1,evNumber2);
6a748468 52}