42 #include <Math/Interpolator.h>
56 ostream &
operator << (ostream & stream,
const Spline & spl);
65 Spline(
string filename,
string xtag=
"",
string ytag=
"",
bool is_xml =
false);
66 Spline(TNtupleD * ntuple,
string xy,
string cut=
"");
67 Spline(TTree * tree,
string xy,
string cut=
"");
68 Spline(TSQLServer * db,
string query);
69 Spline(
int nentries,
double x[],
double y[]);
70 Spline(
int nentries,
float x[],
float y[]);
72 Spline(
const TSpline3 & spline,
int nknots);
79 bool LoadFromTree (TTree * tr,
string xy,
string cut =
"");
85 void GetKnot (
int iknot,
double & x,
double & y)
const;
100 void SaveAsXml (
string filename,
string xtag,
string ytag,
string name=
"")
const;
101 void SaveAsXml (ofstream & str,
string xtag,
string ytag,
string name=
"")
const;
102 void SaveAsText(
string filename,
string format=
"%10.6f\t%10.6f")
const;
103 void SaveAsROOT(
string filename,
string name=
"",
bool recreate=
false)
const;
106 TGraph *
GetAsTGraph (
int np = 500,
bool xscaling =
false,
107 bool inlog=
false,
double fx=1.,
double fy=1.)
const;
111 void FindClosestKnot(
double x,
double & xknot,
double & yknot, Option_t * opt=
"-+")
const;
115 void Add (
const Spline & spl,
double c=1);
125 void Print(ostream & stream)
const;
135 void BuildSpline (
int nentries,
double x[],
double y[]);
TGraph * GetAsTGraph(int np=500, bool xscaling=false, bool inlog=false, double fx=1., double fy=1.) const
ROOT::Math::Interpolator * fGSLInterpolator
void SetType(string type)
A numeric analysis tool class for interpolating 1-D functions.
void Print(ostream &stream) const
bool LoadFromAsciiFile(string filename)
void BuildSpline(int nentries, double x[], double y[])
double Evaluate(double x) const
bool ClosestKnotValueIsZero(double x, Option_t *opt="-+") const
bool IsWithinValidRange(double x) const
TSpline3 * GetAsTSpline(void) const
bool LoadFromXmlFile(string filename, string xtag, string ytag)
double GetKnotX(int iknot) const
void SaveAsROOT(string filename, string name="", bool recreate=false) const
void Add(const Spline &spl, double c=1)
void Multiply(const Spline &spl, double c=1)
void GetKnot(int iknot, double &x, double &y) const
double GetKnotY(int iknot) const
bool LoadFromTSpline3(const TSpline3 &spline, int nknots)
void SaveAsText(string filename, string format="%10.6f\t%10.6f") const
void SaveAsXml(string filename, string xtag, string ytag, string name="") const
TSpline5 * fInterpolator5
void SetName(string name)
bool LoadFromNtuple(TNtupleD *nt, string xy, string cut="")
bool LoadFromDBase(TSQLServer *db, string query)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void YCanBeNegative(bool tf)
bool LoadFromTree(TTree *tr, string xy, string cut="")
void FindClosestKnot(double x, double &xknot, double &yknot, Option_t *opt="-+") const
friend ostream & operator<<(ostream &stream, const Spline &spl)
void Divide(const Spline &spl, double c=1)