Hi,
I am trying to load and run the attached demo script but get the following errors. (The script does a minimization with minuit2). I have tried with ROOT 5.18 on an UBUNTU Linux machine, and ROOT 5.18 and 5.20 on a Windows XP machine. I get the same errors on both machines. On the linux, Minuit2 was enabled in the config.
using CINT with the command .L Quad4FMain.cxx
the error meassge is: Limitation: Reference member not supported. Please use pointer minuit2/abobj.h(9
using ACLiC with the command .L Quad4FMain.cxx +
the error messages are: ‘cl’ is not recognized as an internal or external command, operable program or batch file. Error:external preprocessing failed… Error: C:\root\bin\rootcint: error loading headers… Error in : Dictionary generation failed…
Any assistance will be greatly appreciated.
Thanks,
Warren
// @(#)root/minuit2:$Name: $:$Id: Quad4FMain.cxx,v 1.1 2005/11/29 17:53:53 moneta Exp $
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
/**********************************************************************
-
- Copyright © 2005 LCG ROOT Math team, CERN/PH-SFT *
-
**********************************************************************/
#include “Quad4F.h”
#include “Minuit2/FunctionMinimum.h”
#include “Minuit2/MnMigrad.h”
#include “Minuit2/MnUserParameters.h”
#include “Minuit2/MnPrint.h”
// #include “TimingUtilities/PentiumTimer.h”
// StackAllocator gStackAllocator;
using namespace ROOT::Minuit2;
int main() {
Quad4F fcn;
// PentiumTimer stopwatch;
// stopwatch.start();
// long long int start = stopwatch.lap().ticks();
// long long int stop = stopwatch.lap().ticks();
// std::cout<<"stop-start: "<<stop - start<<std::endl;
// start = stopwatch.lap().ticks();
{
//test constructor
MnUserParameters upar;
upar.Add(“x”, 1., 0.1);
upar.Add(“y”, 1., 0.1);
upar.Add(“z”, 1., 0.1);
upar.Add(“w”, 1., 0.1);
MnMigrad migrad(fcn, upar);
FunctionMinimum min = migrad();
std::cout<<"minimum: "<<min<<std::endl;
}
// stop = stopwatch.lap().ticks();
// std::cout<<"stop-start: "<<stop - start<<std::endl;
/*
{
//test constructor
std::vector par(4);
std::vector err(4);
for(int i = 0; i < 4; i++) {
par[i] = 1.;
err[i] = 0.1;
}
MnMigrad migrad(fcn, par, err);
FunctionMinimum min = migrad();
std::cout<<"minimum: "<<min<<std::endl;
}
{
//test edm Value
std::vector par(4);
std::vector err(4);
for(int i = 0; i < 4; i++) {
par[i] = 1.;
err[i] = 0.1;
}
MnMigrad migrad(fcn, par, err);
double edm = 1.e-1;
FunctionMinimum min = migrad(20, edm);
std::cout<<"minimum: "<<min<<std::endl;
}
{
//test # of iterations
std::vector par(4);
std::vector err(4);
for(int i = 0; i < 4; i++) {
par[i] = 1.;
err[i] = 0.1;
}
MnMigrad migrad(fcn, par, err);
int niter = 2;
FunctionMinimum min = migrad(niter, 1.e-5);
std::cout<<"minimum: "<<min<<std::endl;
}
*/
return 0;
}
// @(#)root/minuit2:$Name: $:$Id: Quad4F.h,v 1.1 2005/11/29 17:53:53 moneta Exp $
// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
/**********************************************************************
-
- Copyright © 2005 LCG ROOT Math team, CERN/PH-SFT *
-
**********************************************************************/
#include “Minuit2/FCNBase.h”
namespace ROOT {
namespace Minuit2 {
class Quad4F : public FCNBase {
public:
Quad4F() {}
~Quad4F() {}
double operator()(const std::vector& par) const {
double x = par[0];
double y = par[1];
double z = par[2];
double w = par[3];
return ( (1./70.)(21xx + 20yy + 19zz - 14xz - 20yz) + ww );
}
double Up() const {return 1.;}
private:
};
} // namespace Minuit2
} // namespace ROOT