EvtItgFunction Class Reference

#include <EvtItgFunction.hh>

Inheritance diagram for EvtItgFunction:

EvtItgAbsFunction List of all members.

Public Member Functions

 EvtItgFunction (double(*theFunction)(double), double lowerRange, double upperRange)
virtual ~EvtItgFunction ()
virtual void setCoeff (int, int, double)
virtual double getCoeff (int, int)
virtual double value (double x) const
virtual double operator() (double x) const
double upperRange () const
double lowerRange () const
void getRange (double &lower, double &upper) const

Protected Member Functions

virtual double myFunction (double x) const
void setRange (double x1, double x2)

Private Member Functions

 EvtItgFunction (const EvtItgFunction &)
EvtItgFunctionoperator= (const EvtItgFunction &)

Private Attributes

double(* _myFunction )(double x)

Detailed Description

Copyright (C) 1998 LBNL

Generic function where the pointer to the function is available.

The function is taken as type pointer to function returning double and taking a double (the abscissa) and a const RWTValVector<double> reference (the parameter values of the function) as arguments.

See also:
EvtItgFunctionEvtItgFunction
Version:
Id
EvtItgFunction.hh,v 1.1.1.2 2007/10/26 05:03:14 pingrg Exp
Author:
Phil Strother Originator

Definition at line 33 of file EvtItgFunction.hh.


Constructor & Destructor Documentation

EvtItgFunction::EvtItgFunction ( double(*)(double)  theFunction,
double  lowerRange,
double  upperRange 
)

Definition at line 36 of file EvtItgFunction.cc.

00036                                                                                                   :
00037   EvtItgAbsFunction(lowerRange, upperRange),
00038   _myFunction(theFunction)
00039 {}

EvtItgFunction::~EvtItgFunction (  )  [virtual]

Definition at line 46 of file EvtItgFunction.cc.

00047 {}

EvtItgFunction::EvtItgFunction ( const EvtItgFunction  )  [private]


Member Function Documentation

virtual double EvtItgFunction::getCoeff ( int  ,
int   
) [inline, virtual]

Implements EvtItgAbsFunction.

Definition at line 46 of file EvtItgFunction.hh.

00046 {return 0.0;};

void EvtItgAbsFunction::getRange ( double &  lower,
double &  upper 
) const [inline, inherited]

Definition at line 53 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange, and EvtItgAbsFunction::_upperRange.

00053 { lower = _lowerRange; upper = _upperRange; } 

double EvtItgAbsFunction::lowerRange (  )  const [inline, inherited]

Definition at line 52 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange.

Referenced by EvtItgAbsIntegrator::boundsCheck(), and EvtItgAbsIntegrator::normalisation().

00052 {return _lowerRange;}

double EvtItgFunction::myFunction ( double  x  )  const [protected, virtual]

Implements EvtItgAbsFunction.

Definition at line 51 of file EvtItgFunction.cc.

References _myFunction.

00051                                         {
00052   return _myFunction(x);
00053 }

double EvtItgAbsFunction::operator() ( double  x  )  const [virtual, inherited]

Definition at line 54 of file EvtItgAbsFunction.cc.

References EvtItgAbsFunction::myFunction().

00054                                            {
00055   return myFunction(x);
00056 }

EvtItgFunction& EvtItgFunction::operator= ( const EvtItgFunction  )  [private]

virtual void EvtItgFunction::setCoeff ( int  ,
int  ,
double   
) [inline, virtual]

Implements EvtItgAbsFunction.

Definition at line 45 of file EvtItgFunction.hh.

00045 {};

void EvtItgAbsFunction::setRange ( double  x1,
double  x2 
) [inline, protected, inherited]

Definition at line 60 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_lowerRange, and EvtItgAbsFunction::_upperRange.

00060 { _lowerRange=x1; _upperRange=x2; };

double EvtItgAbsFunction::upperRange (  )  const [inline, inherited]

Definition at line 51 of file EvtItgAbsFunction.hh.

References EvtItgAbsFunction::_upperRange.

Referenced by EvtItgAbsIntegrator::boundsCheck(), and EvtItgAbsIntegrator::normalisation().

00051 {return _upperRange;}

double EvtItgAbsFunction::value ( double  x  )  const [virtual, inherited]

Definition at line 45 of file EvtItgAbsFunction.cc.

References EvtItgAbsFunction::_lowerRange, EvtItgAbsFunction::_upperRange, calibUtil::ERROR, EvtItgAbsFunction::myFunction(), and report().

Referenced by EvtBtoXsgammaRootFinder::GetRootSingleFunc().

00045                                        {
00046   if (x >= _lowerRange && x <= _upperRange) return myFunction(x);
00047    report(ERROR,"EvtGen") << "Error in EvtItgAbsFunction::value.  Given co-ordinate " << x
00048                 << " is outside of allowed range [" << _lowerRange << ", "
00049                 << _upperRange << "].  Returning 0.0" << endl;
00050   return 0.0;  // Never get here
00051 }


Member Data Documentation

double(* EvtItgFunction::_myFunction)(double x) [private]

Referenced by myFunction().


Generated on Tue Nov 29 23:19:04 2016 for BOSS_7.0.2 by  doxygen 1.4.7