RE: TF1 saving

From: Jakub Čermák <jakub_at_jcermak.cz>
Date: Tue, 2 Feb 2010 17:18:35 +0100


Hi Rene,
Thanks for your reply. I made very simple example illustrating my problem at http://regulus.utef.cvut.cz/~jcermak/my/example.c . It shows all 3 approaches I tried (predefined gaus, custom formula and custom C function) and writes them into files. I couldn't #include <time.h> (CInt said it can't find it), so there is no measurement, but it can be clearly seen that test2 is much slower then previous. Can you now see what I mean?

And minor issue - why does the ROOT CInt crash after executing this script? This structure works at compiled code without problem.

Best regards

Jakub Čermák
Institute of Experimental and Applied Physics

> -----Original Message-----
> From: Rene Brun [mailto:Rene.Brun_at_cern.ch]
> Sent: Sunday, January 31, 2010 11:08 AM
> To: Jakub Čermák
> Cc: roottalk_at_cern.ch
> Subject: Re: [ROOT] TF1 saving
>
> Could you send the shortest possible RUNNING script with a data file
> containing your histogram and reproducing
> the time and space problem?
>
> Rene Brun
>
> Jakub Čermák wrote:
> > Hi Rooters,
> > I’ve lots of histograms with fitted functions, so started to care
> about size of fitted functions (in the TFile) and speed of fitting.
> > When I use predefined function to fit, like gaus, the fitting is
> quick and resulting TFile is relatively small. But I need to fit with
> more complex function, so I tried standard C function. The fitting was
> still quick, but the resulting TFile is now much bigger. Is it because
> it doesn’t store the formula with params but directly the values of the
> function, right? So it’s not a good solution for me.
> > So I rewrote the C function to string formula and I expected that it
> would store just the formula and params, not „sampled“ function values.
> But I was wrong, the file was as big as when I used C function. And the
> fitting process was considerably slower than previous approaches.
> > So that’s my question – what’s the best solution to store histograms
> fitted with custom function and keep the result file small and fitting
> process quick?
> >
> > It's quite big issue for me, because there are few hundred of
> thousands fitted histograms.
> >
> > The fitting function is [0]*TMath::Gaus(max(min([3], [1]), x), [1],
> [2])
> >
> > Thanks in advance for good ideas :)
> >
> > Best regards
> >
> > Jakub Čermák
> >
> >
> >
> >
Received on Tue Feb 02 2010 - 17:18:47 CET

This archive was generated by hypermail 2.2.0 : Tue Feb 02 2010 - 23:50:02 CET