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