Hi,
Welcome to the ROOT community.
I would propose a few links which can be of help:
- The first one would be Posting code? Read this first!
- The second one would be the TTree::ReadFile method
- The third one would be this tutorial
Those should be enough to help you carry out your task!
I hope this helps.
Cheers,
Danilo