Hi,
I’m beginning to use the GDML tools in ROOT, but I’m having difficulty getting started. I’ve created a simple GDML file containing a cylinder as a start, but only get a blank canvas when drawing. I’m using ROOT 6.12.04 on macOS 10.13.2 with the Cocoa backend if that matters.
$ root
root [0] TGeoManager::Import("root-test.gdml")
Info in <TGeoManager::Import>: Reading geometry from file: root-test.gdml
Info in <TGeoManager::TGeoManager>: Geometry GDMLImport, Geometry imported from GDML created
Info in <TGeoManager::SetTopVolume>: Top volume is My_Vol. Master volume is My_Vol
Info in <TGeoNavigator::BuildCache>: --- Maximum geometry depth set to 100
Info in <TGeoManager::CheckGeometry>: Fixing runtime shapes...
Info in <TGeoManager::CheckGeometry>: ...Nothing to fix
Warning in <TGeoManager::CheckGeometry>: Volume "My_Vol" has no medium: assigned dummy medium and material
Info in <TGeoManager::CloseGeometry>: Counting nodes...
Info in <TGeoManager::Voxelize>: Voxelizing...
Info in <TGeoManager::CloseGeometry>: Building cache...
Info in <TGeoManager::CountLevels>: max level = 1, max placements = 0
Info in <TGeoManager::CloseGeometry>: 1 nodes/ 1 volume UID's in Geometry imported from GDML
Info in <TGeoManager::CloseGeometry>: ----------------modeler ready----------------
(TGeoManager *) 0x7fb19c8f2600
root [1] gGeoManager->GetTopVolume()->Draw("ogle")
Info in <TCanvas::MakeDefCanvas>: created default TCanvas with name c1
root [2]
The GDMl file:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE gdml [
<!ENTITY common_materials SYSTEM "../common/common-materials.xml">
<!ENTITY common_defines SYSTEM "../common/common-defines.xml">
]>
<gdml xmlns:gdml="http://cern.ch/2001/Schemas/GDML"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="schema/gdml.xsd">
<define>
</define>
<materials>
</materials>
<solids>
<tube name="solid" rmin="1" rmax="4" z="20" deltaphi="360." aunit="deg" />
</solids>
<structure>
<volume name="My_Vol">
<solidref ref="solid"/>
</volume>
</structure>
<setup name="Default" version="1.0"> <world ref="My_Vol"/></setup>
</gdml>