Fix duplicate volumes when reading a .db back in
When restoring the GeoModel tree from a .db file, a larger number of PhysVols than expected were found.
The problem turned out to be in GeoModelRead
, in the caching of the volumes that were built.
The copyNumber
was used to create a cache key, together with tableID
and volumeID
.
But the string tableID-volID-copyN
was identifying each volume uniquely... so, when restoring the GeoModel tree from a file, all volumes that should be built as "shared" were created, instead, as unique instances.
I fixed that by removing the copyNumber
from the key used for the cache. In that way, all volumes with the same tableID
and volID
, but with different copyNumber
, share the same Volume instance.
Merge request reports
Activity
added GeoModelIO label
assigned to @rbianchi
This MR closes #39 (closed) .
mentioned in issue #39 (closed)
enabled an automatic merge when the pipeline for 13bea440 succeeds
mentioned in commit 6b318992