When you do:
Float_t myvar;
TFile *inpfile = new TFile(fullname);
TTree *inptree = (TTree*) inpfile->Get("EGAMMA");
TBranch * branch=inptree->GetBranch("brem.Pbrem.fE");
branch -> SetAddress(&myvar);
you tell ROOT to read the variable length array in the
branch “brem.Pbrem.fE” into one single variable “myvar”.
Instead myvar should be an array with the maximum dimension
in the branch.
In the attachement you will find a small example to read
the tree4.root file generated by the tutorial tree4.C
without using a class.
Rene
tree4r.C (663 Bytes)