Using TMinuit2 causes rootcint to throw error

Dear Rooters,

I was trying to use the TMinuit2 migrad optimizer in rootcint, but couldn’t get it running.

The stub code i attach works fine when compiled on the fly, but not in the interpreter.

There seems to be some problem calling the operator() method. I can work around this by using compiled code, but I thought you might be interested in a small script reproducing the error.

kind regards
dirk
testscript.C (678 Bytes)

Hi,

thank you for your script. It is a known problem, the compiled library will not be able to cross the language barrier and call a derived class implemented in CINT.
For using Minuit2 in interpreted mode you can use the ROOT::Math::Minimizer class as documented in
root.cern.ch/drupal/content/nume … nimization

In this case, you use the ROOT::Math::Functor class which supports the possibility to wrap interpreted functions

Best Regards

Lorenzo