Populate physical and logical volumes names from subfiles #135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I am trying to use a gdml where the volumes are defined in child files. Both ROOT and Geant4 are capable of parsing this, but REST not and exits because of this. The problem lies on the TRestGeant4GeometryInfo::PopulateFromGdml where the list of physical and logical volume names is generated.
This PR tries to solve this by adding the physical and volume names to the list. The best way should be to open the child gdml file and search there the name of the volumes but this is more complex (any ideas here are welcome). An easier way is the approach taken in this PR of extracting the name of the child volume from the gdml file name.
Small gdml example to reproduce the issue:
mother.gdml
Solid1.gdml (child file)