StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
St_spline3C.h
1 #ifndef St_spline3C_h
2 #define St_spline3C_h
3 
4 #include "TChair.h"
5 //#include "tables/St_spline3_Table.h"
6 #include "St_spline3_Table.h"
7 #include "TSpline.h"
8 #include "TF1.h"
9 //________________________________________________________________________________
10 class St_spline3C : public TChair {
11  public:
12  St_spline3C(St_spline3 *table=0);
13  virtual ~St_spline3C() {}
14  spline3_st *Struct(Int_t i = 0) const {return ((St_spline3*) Table())->GetTable()+i;}
15  UInt_t getNumRows() const {return GetNRows();}
16  Int_t nknots(Int_t i = 0) const {return Struct(i)->nknots;}
17  Double_t* Xknots(Int_t i = 0) const {return Struct(i)->Xknots;}
18  Double_t* Yknots(Int_t i = 0) const {return Struct(i)->Yknots;}
19  Double_t ValBeg(Int_t i = 0) const {return Struct(i)->ValBeg;}
20  Double_t ValEnd(Int_t i = 0) const {return Struct(i)->ValEnd;}
21  Char_t* option(Int_t i = 0) const {return (Char_t *) Struct(i)->option;}
22  TSpline3* Spline() {return fSpline;}
23  Double_t operator() (Double_t *x, Double_t *p) const {return fSpline->Eval(x[0]);}
24  TF1* Func() {return fFunc;}
25  Bool_t IsValid() {return fValid;}
26  static St_spline3 *Open(const Char_t *path);
27  Bool_t InRange(Double_t x) {return fXmin <= x && x <= fXmax;}
28  private:
29  TSpline3* fSpline;
30  TF1* fFunc;
31  Bool_t fValid;
32  Double_t fXmin;
33  Double_t fXmax;
34  ClassDefChair(St_spline3, spline3_st )
35  ClassDef(St_spline3C,1) //C++ TChair for spline3 table class
36 };
37 //________________________________________________________________________________
38 class Stspline3LndNdxL10 : public St_spline3C {// Log(dN/dx) versus log10(beta*gamma)
39  public:
40  static Stspline3LndNdxL10* instance();
41  Stspline3LndNdxL10(St_spline3 *table=0) : St_spline3C(table) {}
42  virtual ~Stspline3LndNdxL10() {fgInstance = 0;}
43  private:
44  static Stspline3LndNdxL10* fgInstance;
45  ClassDef(Stspline3LndNdxL10,1) //C++ TChair for spline3LndNdxL10
46 };
47 //________________________________________________________________________________
48 class StElectonsDEV_dEdx : public St_spline3C {// Log(dN/dx) versus log10(beta*gamma)
49  public:
50  static StElectonsDEV_dEdx* instance();
51  StElectonsDEV_dEdx(St_spline3 *table=0) : St_spline3C(table) {}
52  virtual ~StElectonsDEV_dEdx() {fgInstance = 0;}
53  private:
54  static StElectonsDEV_dEdx* fgInstance;
55  ClassDef(StElectonsDEV_dEdx,1) //C++ TChair for ElectonsDEV_dEdx
56 };
57 //________________________________________________________________________________
58 class StPionDEV_dEdx : public St_spline3C {// Log(dN/dx) versus log10(beta*gamma)
59  public:
60  static StPionDEV_dEdx* instance();
61  StPionDEV_dEdx(St_spline3 *table=0) : St_spline3C(table) {}
62  virtual ~StPionDEV_dEdx() {fgInstance = 0;}
63  private:
64  static StPionDEV_dEdx* fgInstance;
65  ClassDef(StPionDEV_dEdx,1) //C++ TChair for PionDEV_dEdx
66 };
67 //________________________________________________________________________________
68 class StProtonDEV_dEdx : public St_spline3C {// Log(dN/dx) versus log10(beta*gamma)
69  public:
70  static StProtonDEV_dEdx* instance();
71  StProtonDEV_dEdx(St_spline3 *table=0) : St_spline3C(table) {}
72  virtual ~StProtonDEV_dEdx() {fgInstance = 0;}
73  private:
74  static StProtonDEV_dEdx* fgInstance;
75  ClassDef(StProtonDEV_dEdx,1) //C++ TChair for ProtonDEV_dEdx
76 };
77 #endif
Definition: TChair.h:27
C++ wrapper for &lt;spline3&gt; StAF table.