00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitCore * 00004 * @(#)root/roofitcore:$Id: RooGenFunction.h 28259 2009-04-16 16:21:16Z wouter $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 #ifndef ROO_GEN_FUNCTION 00017 #define ROO_GEN_FUNCTION 00018 00019 #include "RooFunctor.h" 00020 #include "Math/IFunction.h" 00021 00022 class RooGenFunction : public ROOT::Math::IGenFunction { 00023 00024 public: 00025 RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters) ; 00026 RooGenFunction(const RooAbsReal& func, const RooArgList& observables, const RooArgList& parameters, const RooArgSet& nset) ; 00027 RooGenFunction(const RooGenFunction& other) ; 00028 virtual ~RooGenFunction() ; 00029 00030 virtual ROOT::Math::IBaseFunctionOneDim* Clone() const { 00031 return new RooGenFunction(*this) ; 00032 } 00033 00034 /* Int_t numCall() const { return _ftor.numCall() ; } */ 00035 /* void resetNumCall() const { _ftor.resetNumCall() ; } */ 00036 00037 protected: 00038 00039 double DoEval(double) const ; 00040 00041 RooFunctor _ftor ; 00042 00043 ClassDef(RooGenFunction,0) // Export RooAbsReal as functor 00044 }; 00045 00046 #endif 00047