| 1 | #ifndef MARS_MParSpline
|
|---|
| 2 | #define MARS_MParSpline
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MParContainer
|
|---|
| 5 | #include "MParContainer.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class TF1; // MParSpline
|
|---|
| 9 | class TSpline3;
|
|---|
| 10 | class MSpline3;
|
|---|
| 11 |
|
|---|
| 12 | class MParSpline : public MParContainer
|
|---|
| 13 | {
|
|---|
| 14 | private:
|
|---|
| 15 | MSpline3 *fSpline; // Spline hold by this container
|
|---|
| 16 |
|
|---|
| 17 | // MParSpline
|
|---|
| 18 | MSpline3 *ReadSpline(const char *fname) const;
|
|---|
| 19 |
|
|---|
| 20 | // MParContainer
|
|---|
| 21 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
|---|
| 22 |
|
|---|
| 23 | public:
|
|---|
| 24 | MParSpline(const char *name=0, const char *title=0);
|
|---|
| 25 | ~MParSpline() { Clear(); }
|
|---|
| 26 |
|
|---|
| 27 | // MParSpline
|
|---|
| 28 | const MSpline3 *GetSpline() const { return fSpline; }
|
|---|
| 29 |
|
|---|
| 30 | Double_t GetXmin() const;
|
|---|
| 31 | Double_t GetXmax() const;
|
|---|
| 32 | Double_t GetWidth() const;
|
|---|
| 33 |
|
|---|
| 34 | Bool_t IsValid() const { return fSpline ? kTRUE : kFALSE; }
|
|---|
| 35 |
|
|---|
| 36 | Double_t Eval(Double_t val) const;
|
|---|
| 37 |
|
|---|
| 38 | void SetFunction(const TF1 &f);
|
|---|
| 39 | Bool_t SetFunction(const char *func, Int_t n, Double_t xmin, Double_t xmax);
|
|---|
| 40 |
|
|---|
| 41 | //void InitUnity(UInt_t n, Float_t min, Float_t max);
|
|---|
| 42 |
|
|---|
| 43 | void Multiply(const TSpline3 &spline);
|
|---|
| 44 | void Multiply(UInt_t n, const Double_t *x, const Double_t *y);
|
|---|
| 45 | void Multiply(const char *fname);
|
|---|
| 46 |
|
|---|
| 47 | Bool_t ReadFile(const char *fname);
|
|---|
| 48 |
|
|---|
| 49 | // TObject
|
|---|
| 50 | void Clear(Option_t *o="");
|
|---|
| 51 | void Paint(Option_t *o="");
|
|---|
| 52 |
|
|---|
| 53 | void RecursiveRemove(TObject *obj);
|
|---|
| 54 |
|
|---|
| 55 | ClassDef(MParSpline, 1) // Container to hold a MSpline3
|
|---|
| 56 | };
|
|---|
| 57 |
|
|---|
| 58 | #endif
|
|---|