00001 // $Id: StarView.C,v 1.3 2006/08/15 21:43:15 jeromel Exp $ 00002 // $Log: StarView.C,v $ 00003 // Revision 1.3 2006/08/15 21:43:15 jeromel 00004 // Fix rhic -> rhic.bnl.gov 00005 // 00006 // Revision 1.2 1999/05/21 15:33:54 kathy 00007 // made sure Log & Id are in each file and also put in standard comment line with name of owner 00008 // 00009 //======================================================================= 00010 // owner: Valery Fine 00011 // what it does: 00012 //======================================================================= 00013 //*-- Author : Valery Fine 28/08/98 (E-mail: fine@bnl.gov) 00014 { 00015 // To run this example one needs the access to the "rhic" node of afs (/afs/rhic.bnl.gov/star . . .) 00016 // To start this example launch ROOT as follows: 00017 // 00018 //*-* root.exe StarView.C 00019 // 00020 gROOT->Reset(); 00021 Bool_t NT=kFALSE; 00022 if (strcmp(gSystem.GetName(),"WinNT") == 0 ) NT=kTRUE; 00023 const Char_t *viewfile = 0; 00024 if (NT) viewfile = gSystem->ExpandPathName("$(AFS_RHIC)/star/packages/dev/params/geometry/year2a_hadron.root"); 00025 else viewfile = gSystem->ExpandPathName("/afs/rhic.bnl.gov/star/packages/dev/params/geometry/year2a_hadron.root"); 00026 TCanvas Star("Star","Star",400,600); 00027 gBenchmark->Start("read"); 00028 TFile f(viewfile); 00029 gBenchmark->Show("read"); 00030 year2a_hadron.Draw(); 00031 // Now, create ROOT browser to inspect the geometry 00032 TBrowser b; 00033 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/browser.gif"> </P> End_Html // 00034 // Call TPad::x3d() method to create 3D view with the "default" 3D viewer 00035 // Under UNIX it is X3D package 00036 // Under Windows NT/95 - OpenGL 00037 if (NT) Star->x3d(); 00038 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/year2a_hadron.gif"> </P> End_Html // 00039 }
1.5.9