Repository navigation
Commit 333cdd5
MCKinematicsReader: keep the loaded tracks instead of copying them, free the baskets
loadTracksForSourceAndEvent deep-copied the vector which ROOT allocated for us (a pointer to nullptr was
passed, so it is ours) and deleted the original: +1x the event at peak (373 MB for a PbPb event with 6.5M
MCTracks). The vector is now stored directly and the branch address reset. In addition, the decompressed
baskets (~1x the event for the split MCTrack branch) are dropped once the event is the last entry of its
TTree cluster, i.e. when no later entry can reuse them, which keeps small events sharing baskets as fast
as before (QED, 10k events: 0.17 s either way, 0.70 s when dropping after every event). For the PbPb
event: peak memory in use 1628 -> 1232 MB, held after releaseTracksForSourceAndEvent 882 -> 443 MB.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent d745182 commit 333cdd5
1 file changed
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
0 commit comments