| 1 | MUONdisplay (Int_t nevent=0, TString fileName="galice.root") { |
| 2 | // Dynamically link some shared libs |
| 3 | if (gClassTable->GetID("AliRun") < 0) { |
| 4 | gROOT->LoadMacro("loadlibs.C"); |
| 5 | loadlibs(); |
| 6 | /* |
| 7 | } else { |
| 8 | delete gAlice; |
| 9 | gAlice = 0; |
| 10 | */ |
| 11 | } |
| 12 | |
| 13 | // Connect the Root Galice file containing Geometry, Kine and Hits |
| 14 | TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(fileName); |
| 15 | if (!file) file = new TFile(fileName); |
| 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 |
| 25 | AliMUONDisplay *muondisplay = new AliMUONDisplay(750); |
| 26 | |
| 27 | // Display first event |
| 28 | gAlice->GetEvent(nevent); |
| 29 | muondisplay->ShowNextEvent(0); |
| 30 | } |