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"
5 // Note: For the moment it works only with HIJING events, the PYTHIA is
7 //#include <ClassTable.h>
9 void display2 (const char *filename="galice.root",Int_t nevent=0, Int_t * tracks=0, Int_t ntracks=0) {
10 // Dynamically link some shared libs
11 if (gClassTable->GetID("AliRun") < 0) {
12 gROOT->LoadMacro("loadlibs.C");
15 delete gAlice->GetRunLoader();
19 //gROOT->LoadMacro("AliDisplay2.C");
20 gSystem->Load("libAliL3Src");
21 gSystem->Load("libDISPLAY");
22 // Connect the Root Galice file containing Geometry, Kine and Hits
24 AliRunLoader *rl = 0x0;
25 TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
27 cout<<"galice.root is already open \n";
29 rl = AliRunLoader::Open(filename,"DISPLAYED EVENT");
33 cerr<<"Error <display.C()>: can not get Run Loader. Exiting"<<endl;
37 // Get AliRun object from file or create it if not on file
40 gAlice = rl->GetAliRun();
42 cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n";
46 // Create Event Display object
47 AliDisplay2 *edisplay = new AliDisplay2(gClient->GetRoot(), 900, 700);
48 // if (ntracks>0) edisplay->SetTracksToDisplay(tracks, ntracks);
50 // Display the requested event
51 // gAlice->GetEvent(nevent);
56 // edisplay->FindModules();
57 edisplay->ShowNextEvent(0);