Re: bugs in TMinuit ?

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Mar 13 1997 - 09:12:36 MET


Martin Woudstra wrote:
> 
> Hello,
> 
> I'm having lots of problems getting TMinuit to work.
> 
> The following simple piece of code (in a larger programme):
> 
> if (gMinuit == NULL) gMinuit = new TMinuit;
> // initialise Minuit fitting package
> gMinuit->mninit(1,2,3); // giving read/write/save unit numbers; use in
> C++ ???
> PrintOutLevel = min(DebugLevel - 1, 3); // set minuit output level
> (3=maximum)
> char command[20];
> sprintf(command, "%s %i", "set pri", PrintOutLevel);
> Int_t ierr;
> gMinuit->mncomd(command, ierr);
> 
> produces the following run-time error message:
> 
> Error in <TString::AssertElement>: out of bounds: i = 3, Length = 2
> Error in <TString::AssertElement>: out of bounds: i = 7, Length = 2
> Am I doing something completely wrong here, or are there serious bugs in
> TMinuit (I hope the first is true)
> 
> What is the use of the unit numbers in the mninit call anyway in C++?
> (none I guess)

What you do is correct. I have now found the problem when mncond is used
outside the context of the ROOT histogram fitting procedures. I have
fixed the problem in version 1.

You can circumvent this problem by calling mnexcm instead of mncont.

The version of Minuit currently in ROOT versions 0.9 (and also 1.00)
is a direct translation from the original Fortran version (hence
routines like mninit). We are now in the process of reingineering this
class
removing a lot of obsolete stuff and rewriting the set of routines like
mncomd, mnexcm, mnparm by normal member functions to set the internal
Minuit attributes. We are also adding a new member function to draw
graphical contours after the fit.

Rene Brun



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:18 MET