rest-for-physics / framework

The main project containing the core C++ classes defining framework behaviour and primordial analysis and helper tools. It centralises all other rest-for-physics repositories through submodules.
GNU General Public License v3.0
19 stars 11 forks source link

Possible memory leak on `TRestRun` #519

Open lobis opened 6 months ago

lobis commented 6 months ago

I noticed the macro to merge Geant4 simulations (https://github.com/rest-for-physics/geant4lib/blob/master/macros/REST_Geant4_MergeRestG4Files.C) is failing for large merges (50 events per file, 2000 files).

If you watch the memory usage it grows uncontrollably.

When looking at the macro it's very simple so I don't think the problem is the macro itself, but how TRestRun or some other class manages memory.

This is currently causing problems in our workflow where we merge large amounts of smaller files, but I can imagine it may also be problematic in other areas.