{ TFile *myfile = new TFile("myfile.root"); int eventno; int version; int npoints; double px[100],py[100],pz[100]; bool isgood[100]; TTree *mytree; myfile->GetObject("mytree",mytree); mytree->SetBranchAddress("eventno",&eventno); mytree->SetBranchAddress("version",&version); mytree->SetBranchAddress("npoints",&npoints); mytree->SetBranchAddress("px",px); mytree->SetBranchAddress("py",py); mytree->SetBranchAddress("pz",pz); mytree->SetBranchAddress("isgood",isgood); int count = 0; for(int evt=0;evtGetEntries();evt++) { mytree->GetEntry(evt); int count_pts = 0; for(int i=0;i10) count++; } printf("count = %d\n",count); }