Hello,
I am using the SetFCN in the TMinuit as in the root tutorial, TwoHistoFit2D.C. But I am using them in a class and am getting the following message when I make:
classes/PUdeMlocalisation.C: In member function void PUdeMlocalisation::positionner(double*&)': classes/PUdeMlocalisation.C:258: error: no matching function for call to
TMinuit::SetFCN()’
/cern/root/new/include/TMinuit.h:269: note: candidates are: virtual void TMinuit::SetFCN(void*)
/cern/root/new/include/TMinuit.h:270: note: virtual void TMinuit::SetFCN(void ()(Int_t&, Double_t, Double_t&, Double_t*, Int_t))
And the two member functions in the class are:
void PUdeMlocalisation::fcnudem(int &npar,double *gin, double &f, double *par, int iflag) {
f=4.0;
}
void PUdeMlocalisation::positionner(double *&position){
TMinuit *minuit= new TMinuit(4);
minuit->SetFCN(fcnudem);
}
What is it that I am doing wrong, when I define these in a class? Note this same code ran when they were not incorporated into a single class, i.e., were just member functions of a macro.
Thanks!
- Sujeewa