I am writing an application that generates lots of output data in a time loop, which I would like to organize in several asynchronous TTree’s (i.e. not all the trees are updated in each time step) and write all the trees in a single file. At the same time algorithms elsewhere in the code need to read from these trees applying filters to select and retrieve data from anywhere from the most recent entries back.
Is what I am describing possible with TTree’s? Specifically:
Can I simultaneously have several independent and asynchronous TTree’s written in a single file, or should I be using separate files? If such trees are written in a single file and grow very large, will automatic file splitting work or will it cause crashes and data loss?
While maintaining live trees, branches and data structures for writing, can I also simultaneously use these to read data elsewhere? Would I be entering loops over entries as one does for simply reading from ROOT files, or should this be done differently?
Thanks for any advice or examples if available.