Changeset 3210


Ignore:
Timestamp:
02/17/04 09:19:15 (21 years ago)
Author:
raducci
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/macros/spline.C

    r3022 r3210  
    2323
    2424/* User Change */
    25 Byte_t y[]={0x0F,0x10,0x2F,0x7F,0xAA,0x6C,0x14,0x13,0x15,0x18,0x21,0x12,0x11,0x14,0x13};
     25const Byte_t y[]={0x0F,0x10,0x2F,0x7F,0xAA,0x6C,0x14,0x13,0x15,0x18,0x21,0x12,0x11,0x14,0x13};
    2626/* End user Change */
    27 Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};
     27const Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};
    2828
    2929/*This cast is needed only to show graphically the output. Don' t needed if you
  • trunk/MagicSoft/Mars/mtools/MCubicSpline.cc

    r3148 r3210  
    4646//
    4747//
    48 MCubicSpline::MCubicSpline(Byte_t *y, Byte_t *x, Bool_t areAllEq,
     48MCubicSpline::MCubicSpline(const Byte_t *y, const Byte_t *x, Bool_t areAllEq,
    4949                           Int_t n, Double_t begSD, Double_t endSD)
    5050{
     
    5757//
    5858//
    59 MCubicSpline::MCubicSpline(Byte_t *y)
    60 {
    61     Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};
     59MCubicSpline::MCubicSpline(const Byte_t *y)
     60{
     61    const Byte_t x[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,0x0E};
    6262    Init(y,x,kTRUE,15,0.0,0.0);
    6363}
     
    6868//
    6969//
    70 void MCubicSpline::Init(Byte_t *y, Byte_t *x, Bool_t areAllEq,
     70void MCubicSpline::Init(const Byte_t *y, const Byte_t *x, Bool_t areAllEq,
    7171                           Int_t n, Double_t begSD, Double_t endSD)
    7272
     
    137137Double_t MCubicSpline :: Eval(Double_t x)
    138138{
    139     const Int_t n = fCoeff->GetSize()-1;
     139    const Int_t n = fCoeff->GetSize();
    140140    for (Int_t i = 0; i < n; i++)
    141141    {
     
    177177    MCubicCoeff *c;
    178178    while ((c=(MCubicCoeff*)Next()))
    179         min = TMath::Min(min, c->GetMax());
     179        min = TMath::Min(min, c->GetMin());
    180180
    181181    return min;
     
    223223    while ((c=(MCubicCoeff*)Next()))
    224224    {
    225         const Double_t temp = c->GetMax();
     225        const Double_t temp = c->GetMin();
    226226        if (temp >= min)
    227227            continue;
     
    231231    }
    232232
    233     return cmin ? cmin->GetAbMax() : FLT_MAX;
     233    return cmin ? cmin->GetAbMin() : FLT_MAX;
    234234}
    235235
  • trunk/MagicSoft/Mars/mtools/MCubicSpline.h

    r3148 r3210  
    1717    TObjArray *fCoeff; //array of the coefficients
    1818
    19     void Init(Byte_t *y, Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD, Double_t endSD);
     19    void Init(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD, Double_t endSD);
    2020
    2121 public:
    22     MCubicSpline(Byte_t *y, Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD=0.0, Double_t endSD=0.0);
    23     MCubicSpline(Byte_t *y);
     22    MCubicSpline(const Byte_t *y, const Byte_t *x, Bool_t areAllEq, Int_t n, Double_t begSD=0.0, Double_t endSD=0.0);
     23    MCubicSpline(const Byte_t *y);
    2424    ~MCubicSpline();
    2525    Double_t Eval(Double_t x); //Eval the spline at a point x
Note: See TracChangeset for help on using the changeset viewer.