We need to filter events from large samples with a flat TTree structure. We also reduce the number of branches to just a few. Since we are using PROOF for all our analysis, it would be desirable to continue using it. We have tried building a TTree inside Selector which is filled with the branches needed and only for the selected events. This works great when the number of final events is small. However when this is not the case (lots of events passing the filter) memory issues start to appear since, I believe, the whole new TTree is kept in memory. And merging may become impossible. Which is the suggested solution to this? TProofOutputFile? Is there any example I could use for it?
Thanks for your help,