| Summary: | writing material properties broken after 100 characters | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Martin Ritter <martin.ritter> |
| Component: | persistency/gdml | Assignee: | Witold.Pokorski |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | ||
| Priority: | P5 | ||
| Version: | 10.1 | ||
| Hardware: | All | ||
| OS: | All | ||
Thanks a lot for reporting this. I have increased max_chars to 9999. I hope this solves the problem. Cheers, Witek |
When exporting a geometry with GDMLParser the material property values are broken after 100 characters. The problem is in G4GDMLWrite.cc as the transcode() has a max chars value of 99 so even though the tempStr has space for 10000 characters only up to the first 100 are valid, the rest contains random characters like in the following example <define> <matrix coldim="2" name="RINDEX" values="1e-06 1.00027 2e-06 1.00028 3e-06 1.00028 4e-06 1.00029"/> <matrix coldim="2" name="ABSLENGTH" values="1.4e-06 3.45407e+06 1.5e-06 2.62107e+06 1.6e-06 2.02471e+06 1.7e-06 1.58872e+06 1.8e-06 1.26402e+06䅁⭐牋朱䅁䅁䅂[continues up to the correct length...]"/> </define> increasing the max_chars in the transcode() calls fixes the problem.