{ //Reset ROOT and connect tree file gROOT->Reset(); TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("Kinematics.root"); if (!f) { f = new TFile("Kinematics.root"); } TFolder *folder = (TFolder*)f->FindObject("Event0");//Folder TTree *tree = (TTree*)Event0->Get("TreeK");//Tree TBranch *branch = tree->GetBranch("Particles");//Branch //Declaration of leaves types const Int_t kMaxPar = 100; Double_t fPx[kMaxPar]; // Set Address tree->SetBranchAddress("Particles.fPx",fPx); branch->Print(); Long64_t nentries = branch->GetEntries(); cout<<"Entries = "<GetEntry(i); cout<<"Px = "<