TTree Events with large number of Tracks

Hi all,
I’m dealing with TTrees on TFiles and Events.
Following the documentation and the tons of examples on the net, the way is to branch events and to save an event at a time.
Looping over events, the branched event object is reused and enqued in the tree thanks to the t->Fill() method.
That’s ok, but ,in my case, an event is composed of millions of tracks. The suggested approach assumes that the whole event is present in memory, requiring a lot of RAM space.

Is there a way to fill in tracks on the same event, such as an independent branch? Obviously, I’m trying to keep the structure “event->tracks”, where the tracks are stored in a sub-branch. This structure is needed because I’ll need to store more than one event type.
I tried addressing directly the subbranch, but with no success…

Thank you in advance for any hint.

Hi “rooters”,
nobody faced the same problem?

help me please… :confused: