]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | display (Int_t nevent=0) { |
2 | // Dynamically link some shared libs | |
3 | if (gClassTable->GetID("AliRun") < 0) { | |
4 | gROOT->LoadMacro("loadlibs.C"); | |
5 | loadlibs(); | |
6 | } else { | |
7 | delete gAlice; | |
8 | gAlice = 0; | |
9 | } | |
10 | ||
11 | // Connect the Root Galice file containing Geometry, Kine and Hits | |
12 | TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject("galice.root"); | |
13 | if (!file) file = new TFile("galice.root"); | |
14 | ||
15 | // Get AliRun object from file or create it if not on file | |
16 | if (!gAlice) { | |
17 | gAlice = (AliRun*)file->Get("gAlice"); | |
18 | if (gAlice) printf("AliRun object found on file\n"); | |
19 | if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); | |
20 | } | |
21 | ||
22 | // Create Event Display object | |
23 | AliDisplay *edisplay = new AliDisplay(750); | |
24 | ||
25 | // Display first event | |
26 | gAlice->GetEvent(nevent); | |
27 | edisplay->ShowNextEvent(0); | |
28 | } |