StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StarView.C
1 // $Id: StarView.C,v 1.3 2006/08/15 21:43:15 jeromel Exp $
2 // $Log: StarView.C,v $
3 // Revision 1.3 2006/08/15 21:43:15 jeromel
4 // Fix rhic -> rhic.bnl.gov
5 //
6 // Revision 1.2 1999/05/21 15:33:54 kathy
7 // made sure Log & Id are in each file and also put in standard comment line with name of owner
8 //
9 //=======================================================================
10 // owner: Valery Fine
11 // what it does:
12 //=======================================================================
13 //*-- Author : Valery Fine 28/08/98 (E-mail: fine@bnl.gov)
14 {
15  // To run this example one needs the access to the "rhic" node of afs (/afs/rhic.bnl.gov/star . . .)
16  // To start this example launch ROOT as follows:
17  //
18  //*-* root.exe StarView.C
19  //
20  gROOT->Reset();
21  Bool_t NT=kFALSE;
22  if (strcmp(gSystem.GetName(),"WinNT") == 0 ) NT=kTRUE;
23  const Char_t *viewfile = 0;
24  if (NT) viewfile = gSystem->ExpandPathName("$(AFS_RHIC)/star/packages/dev/params/geometry/year2a_hadron.root");
25  else viewfile = gSystem->ExpandPathName("/afs/rhic.bnl.gov/star/packages/dev/params/geometry/year2a_hadron.root");
26  TCanvas Star("Star","Star",400,600);
27  gBenchmark->Start("read");
28  TFile f(viewfile);
29  gBenchmark->Show("read");
30  year2a_hadron.Draw();
31 // Now, create ROOT browser to inspect the geometry
32  TBrowser b;
33 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/browser.gif"> </P> End_Html //
34 // Call TPad::x3d() method to create 3D view with the "default" 3D viewer
35 // Under UNIX it is X3D package
36 // Under Windows NT/95 - OpenGL
37  if (NT) Star->x3d();
38 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/year2a_hadron.gif"> </P> End_Html //
39 }