Message: Are slashes allowed in volume names in GDML? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Are slashes allowed in volume names in GDML? 

Forum: Persistency
Date: 21 Dec, 2012
From: Michael H. Kelsey <Michael H. Kelsey>

I am attempting to add GDML support to an existing application with a C++-generated geometry. The application uses a variety of factory classes with associated G4UImessengers to build the geometry with user-configurable parameters.

To simplify the coding, I re-use the factories' name string for both the Messenger path and for the volume names. In several cases, these names include slashes ("/") to provide both a G4UIcommand hierarchy and a human-readable volume hierarchy.

I was able to successfully export my entire geometry to a GDML file, but on readback, the GDML parser generates warning messages for all of the volume names containing slashes, and fails to construct the geometry:

  G4GDML: Reading 'snolab+fridge.gdml'...
  G4GDML: VALIDATION ERROR! value 'Shield/MuMetalShield0xd641c00' is invalid NCName at line: 381
  G4GDML: VALIDATION ERROR! value 'Shield/MuMetalShield0xd641e10' is invalid NCName at line: 386
  G4GDML: VALIDATION ERROR! value 'Shield/MuMetalShield0xd641c00' is invalid NCName at line: 387
[...]
  G4GDML: VALIDATION ERROR! value 'Fridge/layer40xd65a0c0' is invalid NCName at line: 4452
  G4GDML: VALIDATION ERROR! value 'Fridge/layer50xd65c670' is invalid NCName at line: 4456
  G4GDML: Reading definitions...
  G4GDML: Reading materials...
[...]

The visualization comes up empty. I believe this is a shortcoming of the GDML schema, since the volume name strings are apparently entirely acceptable within the GEANT4 application.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: Are slashes allowed in volume names in GDML?   (Michael H. Kelsey - 21 Dec, 2012)
 Add Message Add Message
to: "Are slashes allowed in volume names in GDML?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]