TF2 with member method of a given class instance (this)

From: Robert Riemann <saloution_at_googlemail.com>
Date: Thu, 15 Jul 2010 15:56:12 +0100


Hi rooters,

I am trying to re-use my member function, which was initially ment to work with ROOT::Match::Functor, but I don't how to get TF2 working with it.
Is it possilble at all to use TF2 with member functions?

Using with Functor:

 ROOT::Math::Functor f(this,TreeWalk::DoLikelihoodFitPoissonMinimize,2);

Signature:

Double_t DoLikelihoodFitPoissonMinimize(const double* xval) const;

I think I have to create a wrapper function to fit the expected signature of TF2:

Double_t TreeWalk::DoLikelihoodFitPoissonMinimizeSep(double* x, double* y) {

    Double_t xval[2] = {

*x,
*y

    };
    return DoLikelihoodFitPoissonMinimize(xval); };

it would be nice to get some hints to get it finally working.

Best Regards,
Robert Received on Thu Jul 15 2010 - 16:56:17 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 15 2010 - 17:50:01 CEST