00001 // $Id: StarWebView.C,v 1.4 2000/04/07 17:07:08 fine Exp $ 00002 // $Log: StarWebView.C,v $ 00003 // Revision 1.4 2000/04/07 17:07:08 fine 00004 // adjusted to the ROOT 2.24 00005 // 00006 // Revision 1.3 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 Internet 00016 // To start this example launch ROOT as follows: 00017 // 00018 //*-* root.exe StarWebView.C 00019 // 00020 00021 gROOT->Reset(); 00022 Bool_t NT=kFALSE; 00023 if (strcmp(gSystem.GetName(),"WinNT") == 0 ) NT=kTRUE; 00024 if (NT) gSystem->Load("ROOT_STAR"); 00025 else gSystem->Load("libSTAR"); 00026 if (!gGeometry) new TGeometry; 00027 TCanvas Star("Star","Star",400,600); 00028 // Pick the geomtery file from the remote Web site at CERN: http://root.cern.ch 00029 gBenchmark->Start("pick"); 00030 TWebFile f("http://www.star.bnl.gov/~fine/star_year_2a.root"); 00031 gBenchmark->Show("pick"); 00032 // List first 3 levels of the geometry 00033 HALL->ls(3); 00034 // Create an TPad view of "ECAL" from this geometry if any 00035 HALL->FindByName("ECAL")->Draw(); 00036 // Now create ROOT browser to inspect the geometry 00037 TBrowser b("STAR",HALL); 00038 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/browser.gif"> </P> End_Html // 00039 // Call TPad::x3d() method to create 3D view with the "default" 3D viewer 00040 // Under UNIX it is X3D package 00041 // Under Windows NT/95 - OpenGL 00042 if (NT) Star.x3d(); 00043 // Begin_Html <P ALIGN=CENTER> <IMG SRC="gif/year2a_hadron2.gif"> </P> End_Html // 00044 }
1.5.9