What is the best way to structure ROOT file for large data?


I’m unpacking raw data into the ROOT file using the custom class inheriting TObject.

Current structure looks like
ROOT file

  • TTree
    – TClonesArray
    — Custom class
    ---- variables, vectors

With the current structure, 1000 events correspond to ~3GB and scanning through the events is quite slow.
Is there the best way to structure the ROOT file?

One other question. The current custom classes inheriting TObject have the destructors defined like

Does this cause any problem when reading ROOT file?
I saw that the use of heap keeps increasing while the other class having the destructor

seems to be okay.

Thank you for the ideas in advance!