Filtering events with PROOF

Hi,

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,

Isidro

Hi Isidro,

Yes, you should try to backup the output TTree with a file, and use the automatic file merging via TProofOutputFile.

There is some doc in
root.cern.ch/drupal/content/hand … root-files
and an example in $ROOTSYS/tutorials/proof . The related selector is $ROOTSYS/tutorials/proof/ProofNtuple.h, .C . The example is steered by the “ntuple” scope in $ROOTSYS/tutorials/proof/runProof.C .
The steering macro also starts a local xrootd to receive the final file.
Have a look and let me know.

Gerri