Dear ROOTers,
consider the folowing test program:
TFile f("susygenerated.root");
TTree * t = f.Get("h1");
Int_t run(0);
Float_t et[4] = { 0,0,0,0 };
t->SetBranchAddress("Empt",et);
t->SetBranchAddress("Runnr",&run);
TBranch * b = t->GetBranch("Empt");
TBranch * b2 = t->GetBranch("Runnr");
b2->GetEntry(22);
cout << "run " << run << endl; //works fine for non array
b->GetEntry(22);
cout << "et " << et[0] << endl; //DOES NOT WORK, GIVES ALLWAY 0
t->GetEntry(22);
cout << "et " << et[0] << endl; //works fine when loading whole tree
Do I have to do something different when I want to do branch->GetEntry() for an array?
cherrs,
Claus Received on Mon Apr 04 2005 - 17:46:08 MEST
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:06 MET