Hello .
I have Tree h2 in root file whict
has some branchs, I can't read that
branchs. For example Trees one branch's name is
"Event_nr" when I am doing h2->Draw("Event_nr")
everything is ok, but when I am doing `
Int_t event;
TBranch *b_Event_nr ;
h2->SetBranchAddress("Event_nr",&Event_nr);(root file already opened)
b_Event_nr = h2->GetBranch("Event_nr");
if(!b_Event_nr){ cerr<<"## Error : Can't find branch
Event_nr"<<endl;exit(1);}
int nentrys = h2->GetEntries();
for(int i=0;i<nentrys;i++) {
b_Event_nr->GetEntry(i); //or h2->GetEntry(i);
cout<<"Event = "<<Event_nr<<endl;
}
I get for for Event_nr wrong numbers like 12001212.
I am using root Version 3.02/07, my OS is RedHat 6.2
What did I wrong ? Thanks .
Vahe.
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:46 MET