Re: [ROOTDEV] problem with TF1 (fwd)

From: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
Date: Tue, 24 Nov 2009 04:45:58 +0000


Dear Rene,

  thank you very much for your patience, but this, unfortunately, did not help me. I changed the code as you suggested and I still get a segmentation violation. I tried this also on root 5.22/00d on SL 4.8 with gcc 4.1.2.

This is the output of the crush:

Maybe I am doing something trivially stupid, but I can not see it.

  My problem of sending messages to the roottalk list has been solved (thanks to Fons Rademakers), so I think it is more appropriate to switch these emails to the general roottalk mailing list.

Alessio.

On Mon, 23 Nov 2009, Rene Brun wrote:

> You have an error in your C++ code. Replace your function by:
>
> Double_t myfunction(Double_t *x, Double_t *par)
>  {
>     Float_t xx =x[0];
>     Double_t f;
>     if (xx!=0.) {
>       f = TMath::Abs(par[0]*TMath::Sin(par[1]*xx)/xx);
>     } else {
>       f =0.;
>     }
>     return f;
>  }
>
>
> Rene
>
> Alessio Mangiarotti wrote:
>> Dear root developers,
>> 
>> I am sorry to generate spam on this other address, but my messages can not 
>> get to the roottalk list (I am a subscribed user). Am I doing something 
>> wrong or it is just a miss-configuration of some filter?
>>
>>  Regards,
>> Alessio Mangiarotti.
>> 
>> 
>> 
>> ---------- Forwarded message ----------
>> Date: Fri, 20 Nov 2009 03:11:40 +0000 (WET)
>> From: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
>> To: roottalk_at_root.cern.ch
>> Cc: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
>> Subject: problem with TF1 (fwd)
>> 
>> 
>> It seems it did not get trough, for some reasons. I attach here the gdb 
>> output as requested on the site.
>> 
>> I hope it gets trough now,
>> Regards,
>> Alessio Mangiarotti.
>> 
>> 
>> ---------- Forwarded message ----------
>> Date: Thu, 19 Nov 2009 01:33:55 +0000 (WET)
>> From: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
>> To: roottalk_at_root.cern.ch
>> Cc: Alessio Mangiarotti <alessio_at_lipc.fis.uc.pt>
>> Subject: problem with TF1
>> 
>> Dear rooters,
>>
>>   I am experiencing a strange problem with TF1. In essence, I would like to 
>> calculate a function for given values of the argument and the parameters. I 
>> would also like to plot the function. However when I use ->EvalPar() on a c 
>> function I defined, root crashes. I reproduced the problem in a much 
>> simpler macro I attach here. If the function is defined with an in line 
>> expression in TF1 root does not crashes. I am using root version 5.24/00b 
>> on ubuntu 6.10 (gcc 4.4.1-4). Maybe I am doing something stupid, but I can 
>> not see it!
>>
>>   To reproduce the problem just type:
>> .L tf1_problem.C
>> tf1_problem();
>> 
>>
>>   I would appreciate any help.
>> Best Regards,
>> Alessio Mangiarotti.
>
>
Received on Tue Nov 24 2009 - 05:46:15 CET

This archive was generated by hypermail 2.2.0 : Tue Nov 24 2009 - 11:50:03 CET