1 //--------------------------------------------------------------------------
4 // Copyright Information: See EvtGen/COPYRIGHT
7 // This software is part of the EvtGen package developed jointly
8 // for the BaBar and CLEO collaborations. If you use all or part
9 // of it, please give an appropriate acknowledgement.
11 // Module: EvtItgPtrFunction.hh
14 // Class describing a function with one vector of coefficients. (Stolen and
15 // modified from the BaBar IntegrationUtils package - author: Phil Strother).
17 // Modification history:
19 // Jane Tinslay March 21, 2001 Module adapted for use in
22 //------------------------------------------------------------------------
24 #ifndef EVTITGPTRFUNCTION_HH
25 #define EVTITGPTRFUNCTION_HH
28 #include "EvtGenModels/EvtItgAbsFunction.hh"
30 class EvtItgPtrFunction: public EvtItgAbsFunction {
34 EvtItgPtrFunction( double (*theFunction)(double, const std::vector<double> &),
35 double lowerRange, double upperRange, const std::vector<double> &coeffs1);
37 virtual ~EvtItgPtrFunction( );
39 virtual void setCoeff(int, int, double);
40 virtual double getCoeff(int, int);
44 virtual double myFunction(double x) const;
49 double (*_myFunction)(double x, const std::vector<double> & coeffs1);
51 // Note: if your class needs a copy constructor or an assignment operator,
52 // make one of the following public and implement it.
53 EvtItgPtrFunction( const EvtItgPtrFunction& ); //// Copy Constructor
54 EvtItgPtrFunction& operator= ( const EvtItgPtrFunction& ); // Assignment op
55 std::vector<double> _coeffs1;
59 #endif // EVTITGPTRFUNCTION_HH