source: trunk/MagicSoft/Mars/mbase/MSpline3.h@ 9260

Last change on this file since 9260 was 9229, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MSpline3
2#define MARS_MSpline3
3
4#ifndef ROOT_TSpline
5#include <TSpline.h>
6#endif
7
8class MSpline3 : public TSpline3
9{
10private:
11 TGraph *ConvertSpline(const TSpline &s, Float_t freq) const;
12 TGraph *ConvertGraph(const TGraph &s, Float_t freq) const;
13 TGraph *ConvertFunc(const TF1 &f, Float_t freq) const;
14
15public:
16 MSpline3(const TGraph &g,
17 const char *opt=0, Double_t valbeg=0, Double_t valend=0)
18 : TSpline3("MSpline3", &g, opt, valbeg, valend)
19 {
20 }
21
22 MSpline3(const TGraph &g, Double_t freq,
23 const char *opt=0, Double_t valbeg=0, Double_t valend=0)
24 : TSpline3("MSpline3", ConvertGraph(g, freq), opt, valbeg, valend)
25 {
26 }
27
28 MSpline3(const TSpline &s, Double_t freq,
29 const char *opt=0, Double_t valbeg=0, Double_t valend=0)
30 : TSpline3("MSpline3", ConvertSpline(s, freq), opt, valbeg, valend)
31 {
32 }
33 /*
34 MSpline3(Double_t xmin, Double_t xmax,
35 const TF1 *func, Int_t n, const char *opt=0,
36 Double_t valbeg=0, Double_t valend=0)
37 : TSpline3("MSpline3", xmin, xmax, func, n, opt, valbeg, valend)
38 {
39 }*/
40 MSpline3(const TF1 &f, const char *opt=0,Double_t valbeg=0, Double_t valend=0);
41
42 MSpline3(const TF1 &f, Double_t freq,
43 const char *opt=0,Double_t valbeg=0, Double_t valend=0)
44 : TSpline3("MSpline3", ConvertFunc(f, freq), opt, valbeg, valend)
45 {
46 }
47
48 MSpline3(const Double_t x[], const Double_t y[], Int_t n, const char *opt=0,
49 Double_t valbeg=0, Double_t valend=0)
50 : TSpline3("MSpline3", const_cast<Double_t*>(x), const_cast<Double_t*>(y), n, opt, valbeg, valend)
51 {
52 }
53
54 Double_t GetXmin() const { return fXmin; } // Minimum value of abscissa
55 Double_t GetXmax() const { return fXmax; } // Maximum value of abscissa
56
57 Int_t GetNp() const { return fNp; }
58
59 ClassDef(MSpline3, 1) // An extension of the TSpline3
60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.