]>
Commit | Line | Data |
---|---|---|
37f14bbf | 1 | // This macro displays the hits belonging to a track for selected detectors |
2 | // Input: in the tracks contains the interesting tracks | |
3 | // ntracks is the number of interesing tracks | |
4 | // The default values correspond to "Show everything" | |
829b0696 | 5 | // Note: For the moment it works only with HIJING events, the PYTHIA is |
6 | // still not supported | |
37f14bbf | 7 | //#include <ClassTable.h> |
8 | ||
829b0696 | 9 | void display2(const char *filename="galice.root", Int_t nevent=0, |
10 | Int_t *tracks=0, Int_t ntracks=0) | |
11 | { | |
12 | // Dynamically link some shared libs | |
37f14bbf | 13 | if (gClassTable->GetID("AliRun") < 0) { |
14 | gROOT->LoadMacro("loadlibs.C"); | |
15 | loadlibs(); | |
16 | } else { | |
829b0696 | 17 | delete gAlice->GetRunLoader(); |
37f14bbf | 18 | delete gAlice; |
19 | gAlice = 0; | |
20 | } | |
829b0696 | 21 | //gSystem->Load("libAliL3Src"); |
22 | gSystem->Load("libDISPLAY"); | |
37f14bbf | 23 | |
829b0696 | 24 | // Connect the ROOT Galice file containing Geometry, Kine and Hits |
25 | AliRunLoader *rl = 0; | |
37f14bbf | 26 | TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename); |
829b0696 | 27 | if(file) { |
28 | Info("display2.C", "galice.root is already open"); | |
37f14bbf | 29 | } |
829b0696 | 30 | rl = AliRunLoader::Open(filename, "DISPLAYED EVENT"); |
31 | ||
32 | if (rl == 0) { | |
33 | Error("display2.C", "can not get Run Loader, exiting..."); | |
37f14bbf | 34 | return; |
829b0696 | 35 | } |
37f14bbf | 36 | |
829b0696 | 37 | // Get AliRun object from file or create it if not on file |
37f14bbf | 38 | rl->LoadgAlice(); |
829b0696 | 39 | |
37f14bbf | 40 | gAlice = rl->GetAliRun(); |
41 | if (!gAlice) { | |
829b0696 | 42 | Error("display2.C", "AliRun object not found on file, exiting..."); |
43 | return; | |
37f14bbf | 44 | } |
829b0696 | 45 | |
46 | // Create Event Display object | |
37f14bbf | 47 | AliDisplay2 *edisplay = new AliDisplay2(gClient->GetRoot(), 900, 700); |
829b0696 | 48 | // if (ntracks > 0) edisplay->SetTracksToDisplay(tracks, ntracks); |
37f14bbf | 49 | |
829b0696 | 50 | // Display the requested event |
51 | rl->GetEvent(nevent); | |
37f14bbf | 52 | rl->LoadKinematics(); |
53 | rl->LoadHeader(); | |
54 | rl->LoadHits(); | |
829b0696 | 55 | |
56 | //edisplay->FindModules(); | |
57 | edisplay->ShowNextEvent(0); | |
58 | } | |
37f14bbf | 59 | |
60 | ||
61 |