Cubic Spline Interpolation Issues

Dear All,
I have been trying to interpolate n = 50 data points (x,y). After I initiate the arrays X[n] and Y[n], I use cubic spline to do the interpolation:
TSpline3 * CuSpl = new TSpline3(“Cubic Spline”, X, Y, n, “b2e2”, 0, 0);

I can easily access the interpolated points by using:
CuSpl ->Eval();

The first derivative using:
CuSpl ->Derivative(); [Not Deriv()]

I also need 2nd derivative which I cannot access.
CuSpl ->Derivative2() does not work.

In fact, root.cern.ch/root/html/ROOT__Mat … lator.html says:

1st derivative should be extracted using ->Deriv() - which does not work in my case…
2nd derivative should be extracted using ->Deriv2()- neither Deriv2() nor Derivative2() works…

Can anyone please tell me what function must be used to get 2nd derivative? Any help will be appreciated.

-Kolahal

P.S. I am using ROOT 5.34 in Ubuntu 12.10…

Since nobody answered and after trying myself for sometimes, I figured out what happened, let me write them down…The documentation of TSpline3 is here: root.cern.ch/root/html/TSpline3.html and there is no option for extracting 2nd derivative directly. One may wish to obtain the second derivative using numerical 2nd order derivative formula (using Eval()).

A second method is to use ROOT::MATH::Interpolator [also implements cubic spline] which takes data as vector argument. There Deriv() and Deriv2() can be used to calculate the derivatives.

-Kolahal