Problem 2323 - Region import logic flawed
Summary: Region import logic flawed
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: persistency/gdml (show other problems)
Version: 10.7
Hardware: All All
: P4 normal
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2021-02-03 08:33 CET by Shang Jiaxuan
Modified: 2021-02-03 09:46 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Shang Jiaxuan 2021-02-03 08:33:34 CET
Region import looks for Region in auxGlobalList to add the region. However, if some other global auxiliary info is present before a Region auxiliary info, the import is currently aborted, and the regions after that point is not imported. Suggested fix is to change the return in the item iteration loop to continue (line 101 in G4GDMLParser.cc).

Also the destructor does not make sense not delete the ullist and rlist when user gives it G4GDMLWriteStructure. It allocates no matter if the user offers a G4GDMLWriteStructure or not, and should deallocate it when it is done. These fields are only used in RegionExport function, and is allocated there.

Suggested and pull discussion is started at https://github.com/Geant4/geant4/pull/19/
Comment 1 Gabriele Cosmo 2021-02-03 09:46:30 CET
As noted in GitHub PR#19, fixes will be be included in next patch release.