TLeaf::PrintValue does not return any value, it prints the value on cout.
Use GetValue instead.
Rene
Adam Roe wrote:
> Hi Rooters,
> I have a confused pointer, but i can't seem to straighten it out. The following is from the command line, where Calibration is a Tree that i have loaded in.
>
> root [16] Int_t Mycham_id = Calibration->GetBranch("EVENT")->GetLeaf("id")->PrintValue()
> root [17] Mycham_id
> 220113290(Int_t)0
> root [18] std::cout << Mycham_id << std::endl;
> 0
>
> I am trying to access the value of id, which is 220113290 in this case. I don't understand why the last line does not output the value, but rather the 0 - presumably the same 0 that is showing up from the output of line 17.
>
> Thanks,
> Adam
>
Received on Wed Sep 06 2006 - 13:56:29 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET