You can always create a TSpline embedded in a TF1:
Double_t spline_4nodes(Double_t *x, Double_t *par)
{
/*Fit parameters:
par[0-3]=X of nodes (to be fixed in the fit!)
par[4-7]=Y of nodes
par[8-9]=first derivative at begin and end (to be fixed in the fit!)
*/
Double_t xx = x[0];
Double_t xn[4] = { par[0], par[1], par[2], par[3] };
Double_t yn[4] = { par[4], par[5], par[6], par[7] };
Double_t b1 = par[8];
Double_t e1 = par[9];
TSpline3 sp3("sp3", xn, yn, 4, "b1e1", b1, e1);
return sp3.Eval(xx);
}
TF1 *f_spline4 = new TF1("f_spline4", spline_4nodes, xmin, xmax, npars); // npars = 2*nodes+2
hist->Fit(f_spline4);