Re: Bug in TGraph2D 5.28

From: Noel Dawe <Noel.Dawe_at_cern.ch>
Date: Wed, 25 May 2011 16:43:55 -0700


The constructor of TGraph2D doesn't seem to set fNpoints like TGraph does. Overall the TGraphXX classes could use some unification (common Graph base class?).

Noel

On Tue, May 24, 2011 at 4:43 PM, <wlavrijsen_at_lbl.gov> wrote:

> Noel,
>
>
> import ROOT
>>>>> g = ROOT.TGraph(3)
>>>>> g.GetN()
>>>>>
>>>> 3
>>
>>> g = ROOT.TGraph2D(3)
>>>>> g.GetN()
>>>>>
>>>> 0
>>
>>>
>>>>>
>> ???
>>
>
> there's an issue with construction/destruction ordering given that neither
> TGraph(2D) has a name, so after the construction the same object will be
> deleted due to it's reference going away.
>
> That said, I see the same in CINT:
>
> root [0] g = new TGraph(3);
> root [1] g->GetN()
> (const Int_t)3
> root [2] g2 = new TGraph2D(3);
> root [3] g2->GetN()
> (const Int_t)0
> root [4]
>
> so there must be something more to it ...
>
> Best regards,
> Wim
> --
> WLavrijsen_at_lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
>
Received on Thu May 26 2011 - 01:44:23 CEST

This archive was generated by hypermail 2.2.0 : Fri May 27 2011 - 11:50:02 CEST