44:
fX(theGraph->GetX(), theGraph->GetX() + theGraph->GetN()),
45 fY(theGraph->GetY(), theGraph->GetY() + theGraph->GetN())
61 Int_t ibin = std::distance(std::lower_bound(
fX.rbegin(),
fX.rend(),
x, std::greater{}),
fX.rend()) - 1;
63 if (ibin < 0 ) ibin = 0;
64 if (ibin >=
N) ibin =
N - 1;
67 if ((
x >
fX[ibin] && ibin !=
N-1) || ibin == 0)
75 return fY[ibin] + (
x -
fX[ibin]) * dy/dx;
int Int_t
Signed integer 4 bytes (int).
double Double_t
Double 8 bytes.
TSpline1(const TString &title, const TGraph *theGraph)
constructor from TGraph pointer (not owned by TSpline1) TSpline is a TNamed object
void BuildCoeff(void) override
no coefficients to precompute
Double_t Eval(Double_t x) const override
returns linearly interpolated TGraph entry around x
std::vector< Double_t > fY
virtual ~TSpline1(void)
destructor
void GetKnot(Int_t i, Double_t &x, Double_t &y) const override
no knots
std::vector< Double_t > fX
virtual void SetNameTitle(const char *name, const char *title)
Set all the TNamed parameters (name and title).