Changeset 8522


Ignore:
Timestamp:
05/16/07 16:30:29 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8520 r8522  
    3232
    3333   * mjobs/MJCalibrateSignal.[h,cc]:
    34      - do not write the interleaced containers anymore
     34     - do not write the interlaced containers anymore
    3535       they have no real meaning if only the ones of the last
    3636       calibration are written
     
    6565       the maximum of the raw-date
    6666     - adapted the use of GetMax
     67
     68   * mextralgo/MExtralgoSpline.h:
     69     - added a function which allows the outside world to access the
     70       spline
     71     - removed Align from EvalInteg, it is done in EvalPrimitive already
     72
     73   * macros/test/extralgospline.C:
     74   - added a macro to test the spline
    6775
    6876
  • trunk/MagicSoft/Mars/mextralgo/MExtralgoSpline.h

    r8354 r8522  
    5959    }
    6060
    61     /*
    62     inline Float_t EvalAt(const Float_t x) const
    63     {
    64         Int_t i = TMath::FloorNint(x);
    65 
    66         // handle under- and overflow of the array-range by extrapolation
    67         if (i<0)
    68             i=0;
    69         if (i>fNum-2)
    70             i = fNum-2;
    71 
    72         return Eval(i, x-i);
    73     }
    74     */
    75 
    7661    // Evaluate first derivative of spline in the interval i with x=[0;1[
    7762    inline Double_t EvalDeriv1(const Float_t x, const Int_t i) const
     
    184169    inline Double_t EvalInteg(Int_t i, Float_t a=0, Float_t b=1) const
    185170    {
    186         // This is to make sure that we never access invalid
    187         // memory, even if this should never happen.
    188         // If it happens anyhow we extraolate the spline
    189         Align(i, a);
    190         Align(i, b);
    191 
    192171        return EvalPrimitive(i, b)-EvalPrimitive(i, a);
    193172    }
     
    471450    Float_t ExtractNoise(/*Int_t iter*/);
    472451    void Extract(Byte_t sat, Int_t maxpos, Bool_t width=kFALSE);
     452
     453    Float_t EvalAt(const Float_t x) const;
    473454};
    474455
     456inline Float_t MExtralgoSpline::EvalAt(const Float_t x) const
     457{
     458    Int_t   i = TMath::FloorNint(x);
     459    Float_t f = x-i;
     460
     461    Align(i, f);
     462
     463    return Eval(i, f);
     464}
     465
    475466#endif
Note: See TracChangeset for help on using the changeset viewer.