Created attachment 91 [details] My G4GDMLWrite.cc Hello. I had an issue about how GDML names logical volumes. Before the geant version 4.9.2p02 logical volumes were named according to their own names, say, AirBoxLogical.gdml. I have some 100 volumes and it was clear if I want to look at particular volume afterwards. Now I use 4.9.3(not patched) and they are named like depth12_module7.gdml (in G4GDMLWrite.cc:303). Was there any reason to change this naming scheme? I would prefer to preserve the former naming scheme. Another issue is that if a gdml file already exists, Geant quits (G4GDMLWrite.cc:149), and I would recommend just to ignore this, and keep writing other files. Now I replace the corresponding strings of my Geant local distribution so that I get what I want, but I'd like to have it in releases as well. I attach my G4GDMLWrite.cc file just in case it could help. Thanks
The assignment by depth and module number to the file name is explicitly done exactly to avoid cases of file overwrite. A simple scheme as the one suggested cannot work when modularizing by depth and has no meaning, since the name associated to a logical or physical volume is NOT guaranteed to be unique across the geometry tree at the same level, as more than one gdml files will be generated for each volume in that level. You should use the modularization by physical-volume pointer and not by depth, in your case, i.e. as from the documentation: parser.AddModule(physvol); Dumps the geometry modularizing the output. The generated module will include the geometry tree starting from the physical-volume pointer physvol.