For simplicity I am using the basic example found here.
I want to check this geometry for possible overlaps, using the macro ‘REST_ValidateGeometry’.
But I got the following error
root [0] REST_ValidateGeometry("box.gdml")
Info in <TGeoManager::Import>: Reading geometry from file: box.gdml
Info in <TGeoManager::TGeoManager>: Geometry GDMLImport, Geometry imported from GDML created
Error in <TXMLEngine::ParseFile>: Unexpected end of xml file
Error in <TXMLEngine::ParseFile>: Error include external XML file at line 27
Error in <TGeoManager::Import>: Cannot open file
Error in <TGeoManager::CheckOverlaps>: Top node not set
(int) 0
The line 27 corresponds to the beginning of the <solid> section in the box.gdml file.
I tested with other geometries and had the same problem, each time TXMLEngine::ParseFile pointing to the line corresponding to solid definitions.
I opened the REST_ValidateGeometry.C file which is rather simple, but I couldn’t say if the problem comes from here.
Usually, do you use this macro to validate your geometry or do you use another tool?
Actually the macro you are trying to use was obsolete.
The reason is that before we were just reading plain GDML files, while now we do a re-interpretation of the GDML that allows us to introduce system variables such as ${GDML_PRESSURE} or include files that are placed at remote locations such as the https://rest-for-physics.github.io/materials/rest.xml that we use in our geometry definitions.
Hi,
Thanks for your explanation, it makes more sense now.
Concerning the geometry check, I found some nice package written in Python as pyg4ometry, but maybe there is something in REST that could be interesting.