struct hit_t { int n; int detId[256]; int ch[256]; float e[256]; }; struct cluster_t { int n; float e[16]; float x[16]; float y[16]; }; struct point_t { int n; float e[16]; float x[16]; float y[16]; }; void test(const char*fname = "pi0.FmsEmJet.root") { TFile *fin = new TFile(fname, "read"); TTree *tin = (TTree*) fin->Get("FmsEmJet"); struct hit_t hit; struct cluster_t clu; struct point_t point; tin->SetBranchAddress("hit", &hit); tin->SetBranchAddress("clu", &clu); tin->SetBranchAddress("point", &point); // const int nEntries = tin->GetEntries(); const int nEntries = 1; for (int ei=0; eiGetEntry(ei); cout << "hit\t" << hit.n << "\t"; for (int hi=0; hiClose(); }