Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8521)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8522)
@@ -32,5 +32,5 @@
 
    * mjobs/MJCalibrateSignal.[h,cc]:
-     - do not write the interleaced containers anymore
+     - do not write the interlaced containers anymore
        they have no real meaning if only the ones of the last
        calibration are written
@@ -65,4 +65,12 @@
        the maximum of the raw-date
      - adapted the use of GetMax
+
+   * mextralgo/MExtralgoSpline.h:
+     - added a function which allows the outside world to access the
+       spline
+     - removed Align from EvalInteg, it is done in EvalPrimitive already
+
+   * macros/test/extralgospline.C:
+   - added a macro to test the spline
 
 
Index: trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h
===================================================================
--- trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h	(revision 8521)
+++ trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h	(revision 8522)
@@ -59,19 +59,4 @@
     }
 
-    /*
-    inline Float_t EvalAt(const Float_t x) const
-    {
-        Int_t i = TMath::FloorNint(x);
-
-        // handle under- and overflow of the array-range by extrapolation
-        if (i<0)
-            i=0;
-        if (i>fNum-2)
-            i = fNum-2;
-
-        return Eval(i, x-i);
-    }
-    */
-
     // Evaluate first derivative of spline in the interval i with x=[0;1[
     inline Double_t EvalDeriv1(const Float_t x, const Int_t i) const
@@ -184,10 +169,4 @@
     inline Double_t EvalInteg(Int_t i, Float_t a=0, Float_t b=1) const
     {
-        // This is to make sure that we never access invalid
-        // memory, even if this should never happen.
-        // If it happens anyhow we extraolate the spline
-        Align(i, a);
-        Align(i, b);
-
         return EvalPrimitive(i, b)-EvalPrimitive(i, a);
     }
@@ -471,5 +450,17 @@
     Float_t ExtractNoise(/*Int_t iter*/);
     void Extract(Byte_t sat, Int_t maxpos, Bool_t width=kFALSE);
+
+    Float_t EvalAt(const Float_t x) const;
 };
 
+inline Float_t MExtralgoSpline::EvalAt(const Float_t x) const
+{
+    Int_t   i = TMath::FloorNint(x);
+    Float_t f = x-i;
+
+    Align(i, f);
+
+    return Eval(i, f);
+}
+
 #endif
