Display macro with digits, clusters, reconstructed tracks (JB, AM)
[u/mrichter/AliRoot.git] / RICH / RICHdisplay.C
CommitLineData
ddae0931 1RICHdisplay (Int_t nevent=0) {
2// Dynamically link some shared libs
3
4 if (gClassTable->GetID("AliRun") < 0) {
5 gROOT->LoadMacro("loadlibs.C");
6 loadlibs();
7 }
fd4f0eed 8 else {
9 //delete gAlice;
10 gAlice = 0;
11 }
ddae0931 12
13
14// Connect the Root Galice file containing Geometry, Kine and Hits
15
16 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root");
17 if (file) file->Close();
18 file = new TFile("galice.root","UPDATE");
19 file->ls();
20
21 printf ("I'm after Map \n");
22
23// Get AliRun object from file or create it if not on file
24
25 if (!gAlice) {
26 gAlice = (AliRun*)file->Get("gAlice");
27 if (gAlice) printf("AliRun object found on file\n");
28 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
29 }
fd4f0eed 30 else {
31 delete gAlice;
32 gAlice = (AliRun*)file->Get("gAlice");
33 if (gAlice) printf("AliRun object found on file\n");
34 if (!gAlice) gAlice = new AliRun("gAlice","Alice test program");
35 }
36
ddae0931 37 printf ("I'm after gAlice \n");
38
39 // Create Event Display object
fd4f0eed 40 AliRICHDisplay *richdisplay = new AliRICHDisplay(750);
ddae0931 41
42// Display first event
43 gAlice->GetEvent(nevent);
fd4f0eed 44 richdisplay->ShowNextEvent(0);
45
46
47 //file->Close();
48 //delete file;
49 //delete richdisplay;
ddae0931 50}