Problem 1049 - GDML auxiliary information unavailable from module files.in geant4.9.2
Summary: GDML auxiliary information unavailable from module files.in geant4.9.2
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: persistency/gdml (show other problems)
Version: 9.2
Hardware: PC Linux
: P5 trivial
Assignee: Gabriele Cosmo
URL:
Depends on:
Blocks:
 
Reported: 2009-02-18 17:28 CET by John Watts
Modified: 2009-02-19 10:13 CET (History)
0 users

See Also:


Attachments
Compressed zip of example gdml files (1.86 KB, application/x-zip-compressed)
2009-02-18 17:32 CET, John Watts
Details

Note You need to log in before you can comment on or make changes to this problem.
Description John Watts 2009-02-18 17:28:50 CET
Each gdml file consist five pieces: define, material, solids, structure, and setup. G4GDMLParser uses a G4GDMLReadStucture object to read the structure section. The GDML schema allows a geometry to be broken into separate modules. A lower level module is read in the structure section by defining a physvol with a tag <file name="child.gdml"/>. G4GDMLReadStructure member, ReadFile, recursively call G4GDMLStructure to process this tag. This created object has it's own auxMap. This auxMap data should be inserted in the high level auxMap before the object goes out of scope otherwise G4GDMParser will not have access to it.

I used examples/extended/persistancy/gdml/G01/auxilary.gdml in load_gdml to demonstrate the problem.

I broke auxilary.gdml into two files auxiliary_a.gdml and auxilary_b.gdml.
auxilary_b.gdml continues volume Boxvol which has auxiliary information.
auxiliary_a.gdml contines the World volume and load auxililary_b.gdml to define Boxvol. I have attached a zip file containing auxiliary.gdml, auxiliary_a.gdml and auxiliary_b.gdml.

Here is the output for auxiliary.gdml followed by output for auxiliary_a.gdml:
(Note that no auxiliary information is seen for auxiliary_a.gdml

[wattsjw@watts G01]$ load_gdml auxiliary.gdml 

Usage: load_gdml <intput_gdml_file:mandatory> <output_gdml_file:optional>

G4GDML: Reading 'auxiliary.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading setup...
G4GDML: Reading 'auxiliary.gdml' done!
Stripping off GDML names of materials, solids and volumes ...

*************************************************************
 Geant4 version Name: geant4-09-02    (19-December-2008)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

 Auxiliary Information is found for Logical Volume :  Boxvol
 Name of Auxiliary type is  =  SensDet
Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
...............................................................................

[wattsjw@watts G01]$ load_gdml auxiliary_a.gdml 

Usage: load_gdml <intput_gdml_file:mandatory> <output_gdml_file:optional>

G4GDML: Reading 'auxiliary_a.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading module 'auxiliary_b.gdml'...
G4GDML: Reading definitions...
G4GDML: Reading materials...
G4GDML: Reading solids...
G4GDML: Reading structure...
G4GDML: Reading setup...
G4GDML: Reading module 'auxiliary_b.gdml' done!
G4GDML: Reading setup...
G4GDML: Reading 'auxiliary_a.gdml' done!
Stripping off GDML names of materials, solids and volumes ...

*************************************************************
 Geant4 version Name: geant4-09-02    (19-December-2008)
                      Copyright : Geant4 Collaboration
                      Reference : NIM A 506 (2003), 250-303
                            WWW : http://cern.ch/geant4
*************************************************************

Visualization Manager instantiating...
Visualization Manager initialising...
Registering graphics systems...
.............................................................................
Comment 1 John Watts 2009-02-18 17:32:49 CET
Created attachment 37 [details]
Compressed zip of example gdml files

Problem with attaching zip file??
Comment 2 Gabriele Cosmo 2009-02-19 09:59:27 CET
Thanks for the detailed report and test provided.
We could reproduce the problem and identified it in a missing cache of the
auxiliary info from the the child module within the G4GDMLStructure class.
The fix is under way.
Comment 3 Gabriele Cosmo 2009-02-19 10:13:42 CET
The problem is now fixed.
It will be included in the next public patch of Geant4 9.2.