How to read the rootfiles and TTree

Hi all. I have some root files already present and I need to read the data inside the root file using TTree.How to do that?

At the root prompt you need first to open your file:

root[0] auto file = new TFile("your_root_file.root");


root[1] file->ls()

will show you the content of your file.
They you can access your tree directly:

root[2] your_tree->Print();