I am trying to perform a mixed event from a single root file having a TTree. Here I loop over the TTree first and then in another for loop, I get a random entry from the tree to have the second event which I use for the mixed event. However, I see the efficiency of this method is very low (Consuming too much memory and time). Is there a better way to do the mixed event in the root @rene?
Many thanks in advance.
ROOT Version: Not Provided
_Platform: MAC Compiler: Not Provided
I would say that in general what you are doing is inefficient. Just the fact of randomly reading an event of the same tree in the inner loop, which could belong to a completely different part of the file, will involve a lot more I/O operations than just reading the file sequentially.