00001 //*-- Author : Valery Fine(fine@bnl.gov) 25/01/99 00002 // $Id: StarGeom.C,v 1.4 2000/04/07 17:07:08 fine Exp $ 00003 // $Log: StarGeom.C,v $ 00004 // Revision 1.4 2000/04/07 17:07:08 fine 00005 // adjusted to the ROOT 2.24 00006 // 00007 // Revision 1.3 1999/05/21 15:56:42 kathy 00008 // change name of owner on StarGeom.C 00009 // 00010 // Revision 1.2 1999/05/21 15:33:54 kathy 00011 // made sure Log & Id are in each file and also put in standard comment line with name of owner 00012 // 00013 //======================================================================= 00014 // owner: Valery Fine 00015 // what it does: 00016 //======================================================================= 00017 00018 { 00019 // Load the share library 00020 gROOT->Reset(); 00021 printf( " Loading share library\n"); 00022 gSystem->Load("libSTAR"); 00023 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 00024 TFile f("$(STAR)/star.root"); 00025 00026 // Show a diagram of the entire structure 00027 TBrowser *starbrowser = new TBrowser("STAR",HALL); 00028 00029 // Let's find some sub-detector in there 00030 TDataSetIter detector(HALL); 00031 00032 TVolume *pipe = detector("HALL/CAVE/PIPE"); 00033 // If found draw it 00034 if (pipe) pipe->Draw(); 00035 00036 // Create view class 00037 // TVolumeView *view = new TVolumeView(*hall); 00038 // view->Draw(); 00039 #if 0 00040 // One may convert STAR TVolume's to the standard ROOT TNode objects 00041 l->Clear(); 00042 g->SetCurrentNode(0); 00043 TNode *RootHall = HALL->CreateTNode(); 00044 delete HALL; 00045 RootHall->cd(); 00046 #endif 00047 c1->Update(); 00048 // 00049 // Draw the geometry using the x3d viewver. 00050 // Note that this viewver may also be invoked from the "View" menu in 00051 // the canvas tool bar 00052 // c1->x3d(); 00053 }
1.5.9