StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TF1F.h
1 #ifndef TF1F_h
2 #define TF1F_h
3 #include "TF1.h"
4 #include <string.h>
5 class TF1F : public TF1 {
6  public:
7 #if ROOT_VERSION_CODE < 393216 /* = ROOT_VERSION(6,0,0) */
8  TF1F() : TF1() {fNpx = 200;}
9  TF1F(const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1) :
10  TF1(name, formula, xmin, xmax) , fdX(-1), fStep(-1) {fNpx = 200;}
11  TF1F(const char *name, Double_t xmin, Double_t xmax, Int_t npar) :
12  TF1(name, xmin, xmax, npar) , fdX(-1), fStep(-1) {fNpx = 200;}
13  TF1F(const char *name, void *fcn, Double_t xmin, Double_t xmax, Int_t npar) :
14  TF1(name, fcn, xmin, xmax, npar) , fdX(-1), fStep(-1) {fNpx = 200;}
15  TF1F(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0) :
16  TF1(name, fcn, xmin, xmax, npar) , fdX(-1), fStep(-1) {fNpx = 200;};
17 #else /* ROOT 6 */
18  TF1F();
19  TF1F(const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1);
20  TF1F(const char *name, void *fcn, Double_t xmin=0, Double_t xmax=1, Int_t npar=0);
21 #if !defined(__CINT__) && !defined(__CLING__)
22  TF1F(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1 );
23  TF1F(const char *name, Double_t (*fcn)(const Double_t *, const Double_t *), Double_t xmin=0, Double_t xmax=1, Int_t npar=0, Int_t ndim=1);
24 #endif
25 
26  // constructor using a functor
27  TF1F(const char *name, ROOT::Math::ParamFunctor f, Double_t xmin = 0, Double_t xmax = 1, Int_t npar = 0, Int_t ndim=1);
28 
29  // Template constructors from a pointer to any C++ class of type PtrObj with a specific member function of type
30  // MemFn.
31  template <class PtrObj, typename MemFn>
32  TF1F(const char *name, const PtrObj& p, MemFn memFn, Double_t xmin, Double_t xmax, Int_t npar, Int_t ndim, const char * c1, const char * c2) :
33  TF1(name,p,memFn,xmin,xmax,npar,c1,c2)
34  {
35  fNpx = 200;
36  }
37  // Template constructors from any C++ callable object, defining the operator() (double * , double *)
38  // and returning a double.
39  template <typename Func>
40  TF1F(const char *name, Func f, Double_t xmin, Double_t xmax, Int_t npar, const char * tmp ) :
41  TF1(name,f,xmin,xmax,npar,tmp)
42  {
43  fNpx = 200;
44  }
45 #if 0
46  // constructor used by CINT
47  TF1F(const char *name, void *ptr, Double_t xmin, Double_t xmax, Int_t npar, const char *className );
48  TF1F(const char *name, void *ptr, void *,Double_t xmin, Double_t xmax, Int_t npar, const char *className, const char *methodName = 0);
49 #endif
50 #endif /* ROOT 6 */
51  virtual ~TF1F() {}
52  virtual void Save(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax);
53  Double_t GetSaveL(Double_t *xx);
54  Double_t GetSaveL(Int_t N, Double_t x, Double_t *y);
55  Double_t GetSaveL(Int_t N, Double_t *x, Double_t *y);
56  protected:
57  Double_t fXmin;
58  Double_t fXmax;
59  Double_t fdX;
60  Int_t fStep;
61  ClassDef(TF1F,1)
62 
63 };
64 #endif
Definition: TF1F.h:5