Re: TMinuit again

Rene Brun (Rene.Brun@cern.ch)
Thu, 13 Mar 1997 14:43:21 +0100


Martin Woudstra wrote:
>
> Hello,
>
> I changed the code to mnexcm, but it still crashes.
> In fact, I tried this command before, it crashed, and I tried
> the other one (mncomd).
>
> The code:
>
> Double_t PrintOutLevel = -1; // default no minuit output
> if (DebugLevel)
> {
> PrintOutLevel = min(DebugLevel - 1, 3); // set minuit output level
> (3=maximum)
> }
> Int_t ierr = 0;
> gMinuit->mnexcm("set print", &PrintOutLevel, 1, ierr);
>
> run-time error:
>
> *** Break *** segmentation violation

You do not show the initialisation phase for TMinuit. But if I refert
to your previous email, you are doing:
gMinuit = new TMinuit;
You should change to:
gMinuit = new TMinuit(10); // 10 here means maximum number of
parameters (must be >1)

I will protect the default constructor.
Rene Brun