On Fri, 8 May 1998, Rene Brun wrote:
> Hi Tadeusz,
> In your macro below, you have the statement:
> TFile hfile("prob.root");
> When you exit from the procedure prob, all objects created
> in prob (except the ones created via new) are automatically deleted.
> This is the normal scoping rule in C++.
> The object hfile is also deleted. When hfile is deleted,
> all objects in the container hfile are deleted.
> If you simply replace the above statement by:
> TFile *hfile = new TFile("prob.root");
> your program will not delete objects at the end of execution.
> I have modified the macro accordingly.
>
> Concerning, Factorial, Binomial, etc, these functions could be added
> in a TUtils class (as static functions). Just waiting for good
> and efficient code. I have no time to implement these functions.
>
> As described in the TF1 constructor, the parameter referencing
> the function must be of type Double_t.
>
> Rene Brun
>
>
>
> Tadeusz Pytlos wrote:
> >
> > Hello Rooters,
> > I have a few problems linking with fiting of histogram.
> > 1) I'm trying to solve such equation
> > myhist=integral(0,infinity) fun1(dN)*fun2() d(dN),
> > where function fun2() I don't know, so I treat it as parameters
> > to estimate par[dN]. Of course, intergral I replace by sum(0,dN).
> > The problem is that there are only maximum 10 parameters to fit!
> > It's too less for my purposes. Is it possible to implement more?
> > Or is there any better possibility to solve my problem?
> > Can I use TMinuit for such problem? I will be grateful
> > for any ideas.
> > I include my macro and root file with histogram. Myhist is red and
> > right side of equation is black.
> >
> > 2) Is possible to implement such functions like Factorial
> > and Binomial in future ROOT?
> > 3) I don't understand why my macro didn't stop, but I have to use
> > getchar(). What clears my canvas?
> > 4) I went about it, but I want to mention. I had problems with
> > Double_t fitf(Int_t *k, Double_t *par). Is fit function only designed
> > for Double_t?
> > Thank you in advance.
> > Best wishes,
> > Tadeusz Pytlos
> >