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]
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.
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
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.
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:
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]