Hello Margar,
I think there is a bug in the definition of TGraph2D::SetPoint. This function must be defined as virtual since it is re-implemented by the TGraph2DErrors and presently it is not. We fill fix this in SVN. Thank you for reporting this
Lorenzo
On Mar 16, 2009, at 3:41 PM, Margar Simonyan wrote:
> Hi Bakur
>
> yes, that is one solution. My understanding was that TGraph (2D) is a
> dynamic object and internally extends the arrays when needed. In my
> code at the time of creation of TGraph I don't know the number of
> points, of course the points can be filled into dynamic array and when
> the length is known one can create a TGraph with required number of
> points.
>
> Thanks,
> Margar
>
> PS. sorry for double posting, in the past it was impossible to send
> email to roottalk from gmail account
>
> On Mon, Mar 16, 2009 at 3:25 PM, Bakur Parsamyan <bakur_at_cern.ch>
> wrote:
>>
>> Hi Margar,
>>
>> I guess you need to define number of points in your graph..
>> Try to use g->Set(n);
>> http://root.cern.ch/root/htmldoc/
>> TGraph2DErrors.html#TGraph2DErrors:Set
>>
>> regards,
>>
>> Bakur.
>>
>>
>>
>> Margar Simonyan wrote:
>>>
>>> Hello ROOT team
>>>
>>> I don't understand why the following few lines result into ROOT
>>> crush
>>>
>>> root [0] TGraph2DErrors * g = new TGraph2DErrors()
>>> root [1] g->SetNameTitle("a", "b")
>>> root [2] g->SetPoint(0, 1.0, 1.0, 1.0)
>>> root [3] g->SetPointError(0, 1.0, 1.0, 1.0)
>>>
>>> I have tested on ROOT version 5.16/00 (lxplus) and 5.20/00 (my
>>> laptop). Any explanation ?
>>>
>>> Thanks,
>>> Margar
>>>
>>>
>>> *** Break *** segmentation violation
>>> (no debugging symbols found)
>>> Using host libthread_db library "/lib64/tls/libthread_db.so.1".
>>> Attaching to program: /proc/25479/exe, process 25479
>>> (no debugging symbols found)...done.
>>> [Thread debugging using libthread_db enabled]
>>> [New Thread 182913018112 (LWP 25479)]
>>>
>>>
>>> ------------------------------------------------------------------------------------------------------
>>> Margar Simonyan ------ post-doctoral researcher, ATLAS
>>> LAPP, 9 Chemin de Bellevue, BP 110 F-74941, Annecy-le-Vieux
>>> Tel: +33450091785 +41227671123 (CERN)
>>>
>>> -----------------------------------------------------------------------------------------------------
>>>
>>>
>>
>>
>
Received on Mon Mar 16 2009 - 17:04:22 CET
This archive was generated by hypermail 2.2.0 : Tue Mar 17 2009 - 17:50:02 CET