StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StarGeom.C
1 //*-- Author : Valery Fine(fine@bnl.gov) 25/01/99
2 // $Id: StarGeom.C,v 1.4 2000/04/07 17:07:08 fine Exp $
3 // $Log: StarGeom.C,v $
4 // Revision 1.4 2000/04/07 17:07:08 fine
5 // adjusted to the ROOT 2.24
6 //
7 // Revision 1.3 1999/05/21 15:56:42 kathy
8 // change name of owner on StarGeom.C
9 //
10 // Revision 1.2 1999/05/21 15:33:54 kathy
11 // made sure Log & Id are in each file and also put in standard comment line with name of owner
12 //
13 //=======================================================================
14 // owner: Valery Fine
15 // what it does:
16 //=======================================================================
17 
18 {
19  // Load the share library
20  gROOT->Reset();
21  printf( " Loading share library\n");
22  gSystem->Load("libSTAR");
23  if (!gGeometry) new TGeometry; // Open GEANT geometry generated by begin_html <a href=".././St_geant_Maker.html##St_geant_Maker:Work">St_geant_Maker::Work()</a> method end_html
24  TFile f("$(STAR)/star.root");
25 
26  // Show a diagram of the entire structure
27  TBrowser *starbrowser = new TBrowser("STAR",HALL);
28 
29  // Let's find some sub-detector in there
30  TDataSetIter detector(HALL);
31 
32  TVolume *pipe = detector("HALL/CAVE/PIPE");
33  // If found draw it
34  if (pipe) pipe->Draw();
35 
36 // Create view class
37 // TVolumeView *view = new TVolumeView(*hall);
38 // view->Draw();
39 #if 0
40  // One may convert STAR TVolume's to the standard ROOT TNode objects
41  l->Clear();
42  g->SetCurrentNode(0);
43  TNode *RootHall = HALL->CreateTNode();
44  delete HALL;
45  RootHall->cd();
46 #endif
47  c1->Update();
48  //
49  // Draw the geometry using the x3d viewver.
50  // Note that this viewver may also be invoked from the "View" menu in
51  // the canvas tool bar
52 // c1->x3d();
53 }
virtual void Draw(Option_t *depth="3")
Definition: TVolume.cxx:433