You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two coupled defects in the JSON event serialization, both fixed here by
reworking the shared open/close logic in endEventImpl:
- #116: startEventImpl opened the "header" object but nothing closed it,
so "generated" and "detectors" were nested inside "header" instead of
being siblings. Close the header right after its fields are written
(and in the endEvent fallback when the header step is skipped), and
drop the now-redundant header-closing brace from endEventImpl.
- #115: digitized data was written inline and the "digitized_by_detector"
object was closed on every per-detector call. Because the base class
interleaves publishEventTrueInfoData/publishEventDigitizedData per
detector, a second digitized detector reopened/extended an already
closed object, producing invalid JSON (extra braces, misplaced keys).
Buffer each detector's digitized array and emit them together as one
well-formed "digitized_by_detector" object in endEventImpl.
The existing schema is preserved (per-detector "digitized": [] placeholder
plus the "digitized_by_detector" map). Validated by running the gstreamer
JSON example extended to two detectors: output now parses as valid JSON
with header/generated/detectors as siblings and both detectors' digitized
hits present (Geant4 11.4.1 / Qt6 dev container).
Fixes#115Fixes#116
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
0 commit comments