Home | News | Documentation | Download

GDML Import "Unsupported GDML Tag"


#1

When importing a GDML file that makes use of ENTITY for including some common define values an error is thrown about the unsupported tag, quantity:

$ 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
Error: Unsupported GDML Tag Used :quantity. Please Check Geometry/Schema.
Error: Unsupported GDML Tag Used :quantity. Please Check Geometry/Schema.
Medium: G4_Al, Not Yet Defined!
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 *) 0x7ffbffdb7400
root [1]

The include.xml file:

<quantity name="HalfRev" type="angle" value="180." unit="degree"/>
<quantity name="FullRev" type="angle" value="360." unit="degree"/>

The root-test.gdml file:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE gdml [
   <!ENTITY include SYSTEM "include.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>
   <!-- The following include causes error messages. -->
   &include;
</define>

<materials>
</materials>

<solids>
   <tube name="solid" rmin="1" rmax="4" z="20" deltaphi="FullRev" />
</solids>

<structure>
   <volume name="My_Vol">
      <solidref ref="solid"/>
      <materialref ref="G4_Al"/>
   </volume>
</structure>

<setup name="Default" version="1.0"> <world ref="My_Vol"/></setup>
</gdml>

Render of link to previous post no longer provides link
#2

This link may be of help: http://xml.silmaril.ie/includes.html. Apparently, you are missing a DTD entry, or may need to use <xi:include href="include.xml"/> from within <gdml></gdml> in root-test.gdml.


#3

Section 3.1.1 of the GDML manual states that I can use ENTITY and this seems to work well in Geant4. Are you indicating that the ROOT XML parser does not support ENTITY and thus is “non-compliment” with GDML?

I do like the look of this solution better, but it does not seem to be supported in ROOT:

Error: Unsupported GDML Tag Used :xi:include. Please Check Geometry/Schema.

And not supported in Geant4 (as usual indicated with a vague error message, you can tell it is the include as the status messages stop in the define section):

...
Constructing mass model...
   GGDML file: ./root-test.gdml
G4GDML: Reading './root-test.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading './root-test.gdml' done!
Stripping off GDML names of materials, solids and volumes ...

-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : NullSetup
      issued by : G4GDMLReadSetup::getSetup()
Referenced setup 'Default' was not found!Returning NULL pointer!

*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : FATAL ERROR
      issued by : GDMLDetectorConstruction::Construct()
World volume not set properly; check your setup selection criteria or GGDML input!
*** Fatal Exception *** core dump ***
-------- EEEE -------- G4Exception-END --------- EEEE -------


*** G4Exception: Aborting execution ***
Abort trap: 6

#4

Any suggestions on how to proceed here before the topic gets locked?


#5

Hi,

I see no XML problems here.
Provided GDML file can be parsed correctly by TXMLEngine, used in GDML import.

Most probable reason for the error, that quantity xml tag not supported by TGeoManager.
Actually, if I see it correctly, Geant4 also does not support such xml file.

Regards,
Sergey


#6

I’m not sure what you mean here. The quantity tag is definitely supported by GDML. An excerpt from the GDML manual:


#7

I only mean, that XML parser is ok, but TGeoManager seems to be fails to process node correctly.
Did you try same XML file, but without include statement - just:

<define>
   <quantity name="HalfRev" type="angle" value="180." unit="degree"/>
   <quantity name="FullRev" type="angle" value="360." unit="degree"/>
</define>

Test it also in Geant4?


#8

It appears that TGeoManager does not support the quantity tag.

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
Error: Unsupported GDML Tag Used :quantity. Please Check Geometry/Schema.
Error: Unsupported GDML Tag Used :quantity. Please Check Geometry/Schema.
Medium: G4_Al, Not Yet Defined!
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 *) 0x7ff99b999e00
root [1] 

Geant4:

...
G4GDML: Reading './root-test.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading setup...
G4GDML: Reading './root-test.gdml' done!
Stripping off GDML names of materials, solids and volumes ...
...

Use GDML constants in ROOT script
Render of link to previous post no longer provides link
#9

Is this then a bug? Just trying to keep this from getting locked before it gets resolved.


#10

14 day bump to avoid lock.


#11

I would also like to know if / when this bug will be fixed. “quantity” should be supported.


#12

It seems to be a bug so I added it as an issue to the bug tracker: https://sft.its.cern.ch/jira/projects/ROOT/issues/ROOT-9286


#13

This issue is tying up my use of the GDML importer. Any suggestions on how to continue?


#14

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.