Description Hello,
I am running a simulation using OpenGATE (GATE10) that generates a very large Phase Space file. My simulation aims to record approximately 2.4 billion (2.38e9) particles using the PhaseSpaceActor.
However, the generated ROOT file seems to be corrupted due to a 32-bit signed integer overflow in the entry counter. When I try to read the file using uproot, I encounter the following error indicating that the number of entries has wrapped around to a negative value:
Plaintext
ValueError: entries in normal baskets (-1909440763) plus embedded baskets (0) don't add up to expected number of entries (2385526533) in file output/PhaseSpaceOut.root
This suggests that the ROOT file writing mechanism within the PhaseSpaceActor (or underlying Geant4 analysis manager) hit the int32 limit (~2.14 billion).
Questions
File Splitting: Is there a built-in mechanism or parameter in the OpenGATE Python API (similar to setMaxFileSize in Geant4 or ROOT) to automatically split the output .root files when they reach a certain size or entry count?
Best Practice: For such large simulations in OpenGATE, is the recommended approach to manually loop over sim.run() in Python to produce multiple partial files, or is there a better way to handle >2B entries in a single run?
Environment
OS: Linux
Python version: 3.12
OpenGATE version: 10.0.3
Uproot version: 5.6.8
Thank you for your help!