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

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Thu, 15 Jul 2010 10:44:48 -0500


Hi Robert,

If 'TreeWalk' is a class you also need to declare this function as static.

Cheers,
Philippe.

On 7/15/10 7:37 AM, Robert Riemann wrote:
> 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 - 17:45:03 CEST

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