File indexing completed on 2025-01-18 10:11:17
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef ROO_ABS_FUNC
0017 #define ROO_ABS_FUNC
0018
0019 #include <ROOT/RSpan.hxx>
0020 #include <Rtypes.h>
0021
0022 #include <list>
0023 #include <vector>
0024
0025 class RooAbsRealLValue ;
0026
0027 class RooAbsFunc {
0028 public:
0029 inline RooAbsFunc(UInt_t dimension) : _ncall(0), _dimension(dimension), _valid(true) { }
0030 inline RooAbsFunc(const RooAbsFunc& other) : _ncall(0), _dimension(other._dimension), _valid(true) { }
0031
0032 inline virtual ~RooAbsFunc() { }
0033 inline UInt_t getDimension() const {
0034
0035 return _dimension;
0036 }
0037 inline bool isValid() const {
0038
0039 return _valid;
0040 }
0041
0042 virtual double operator()(const double xvector[]) const = 0;
0043 virtual double getMinLimit(UInt_t dimension) const = 0;
0044 virtual double getMaxLimit(UInt_t dimension) const = 0;
0045
0046
0047 Int_t numCall() const {
0048 return _ncall ;
0049 }
0050
0051
0052 void resetNumCall() const {
0053 _ncall = 0 ;
0054 }
0055
0056 virtual void saveXVec() const {
0057
0058 } ;
0059 virtual void restoreXVec() const {
0060
0061
0062 } ;
0063
0064
0065 virtual const char* getName() const {
0066 return "(unnamed)" ;
0067 }
0068
0069 virtual std::list<double>* binBoundaries(Int_t) const { return nullptr; }
0070
0071
0072
0073 virtual std::list<double>* plotSamplingHint(RooAbsRealLValue& , double , double ) const {
0074 return nullptr;
0075 }
0076
0077 protected:
0078 mutable Int_t _ncall ;
0079 UInt_t _dimension;
0080 bool _valid;
0081 ClassDef(RooAbsFunc,0)
0082 };
0083
0084 #endif
0085