Ignore:
Timestamp:
10/26/09 14:31:19 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbase/MAGIC.cc

    r9195 r9518  
    4040bool MARS::CheckRootVer()
    4141{
     42    if (strcmp(gROOT->GetVersion(), "5.22/00")>0)
     43    {
     44        cout << "WARNING - Especially root 5.24/00 has a severe bug in projection 2D histograms" << endl;
     45        cout << "          which might cause unexpected crashes and could also affect the results." << endl;
     46        cout << "          Please, avoid using these root versions." << endl;
     47    }
     48
    4249    if (!strcmp(gROOT->GetVersion(), ROOT_RELEASE))
    4350        return true;
  • trunk/MagicSoft/Mars/mbase/MEnv.h

    r9345 r9518  
    4141    Int_t       GetValue(const char *name, Int_t dflt);
    4242    Double_t    GetValue(const char *name, Double_t dflt);
    43     const char *GetValue(const char *name, const char *dflt);
     43    const char *GetValue(const char *name, const char *dflt="");
    4444
    4545    // GetValue: regexp
  • trunk/MagicSoft/Mars/mbase/MLut.cc

    r9462 r9518  
    3838#include <stdlib.h>  // atoi (Ubuntu 8.10)
    3939
     40#include <TRegexp.h>
     41
    4042#include "MLog.h"
    4143#include "MLogManip.h"
     
    286288Int_t MLut::ReadStream(istream &fin)
    287289{
     290    static const TRegexp reg("[^ 1234567890]");
     291
    288292    Delete();
     293
     294    Int_t n = 0;
    289295
    290296    while (1)
     
    294300        if (!fin)
    295301            break;
     302
     303        n++;
     304
     305        if (line.Contains(reg))
     306        {
     307            gLog << warn << "WARNING - MLut::ReadStream: Line #" << n << " contains invalid character... ignored." << endl;
     308            continue;
     309        }
    296310
    297311        // Split line by whitespaces
  • trunk/MagicSoft/Mars/mbase/MParSpline.cc

    r9428 r9518  
    322322    fSpline->Paint("PC");
    323323}
     324
     325void MParSpline::RecursiveRemove(TObject *obj)
     326{
     327    if (obj==fSpline)
     328        fSpline=0;
     329}
  • trunk/MagicSoft/Mars/mbase/MParSpline.h

    r9428 r9518  
    2323public:
    2424    MParSpline(const char *name=0, const char *title=0);
     25    ~MParSpline()  { Clear(); }
    2526
    2627    // MParSpline
     
    5051    void Paint(Option_t *o="");
    5152
     53    void RecursiveRemove(TObject *obj);
     54
    5255    ClassDef(MParSpline, 1) // Container to hold a MSpline3
    5356};
  • trunk/MagicSoft/Mars/mbase/MSpline3.cc

    r9450 r9518  
    157157//     W := fX[i+1]-fX[i]
    158158//
    159 Double_t MSpline3::Integral(Int_t i, Double_t x) const
     159Double_t MSpline3::IntegralBin(Int_t i, Double_t x) const
    160160{
    161161    Double_t x0, y, b, c, d;
     
    171171// Return the integral of the spline's bin i.
    172172//
    173 Double_t MSpline3::Integral(Int_t i) const
     173Double_t MSpline3::IntegralBin(Int_t i) const
    174174{
    175175    Double_t x, y;
     
    177177    GetKnot(i+1, x, y);
    178178
    179     return Integral(i, x);
     179    return IntegralBin(i, x);
    180180}
    181181
     
    189189    const Int_t m = FindX(b);
    190190
    191     Double_t sum = -Integral(n, a);
     191    Double_t sum = -IntegralBin(n, a);
    192192
    193193    for (int i=n; i<=m-1; i++)
    194         sum += Integral(i);
    195 
    196     sum += Integral(m, b);
     194        sum += IntegralBin(i);
     195
     196    sum += IntegralBin(m, b);
    197197
    198198    return sum;
     
    208208
    209209    for (int i=0; i<GetNp()-1; i++)
    210         sum += Integral(i);
     210        sum += IntegralBin(i);
    211211
    212212    return sum;
  • trunk/MagicSoft/Mars/mbase/MSpline3.h

    r9424 r9518  
    1515    MArrayD &ConvertFunc(const TF1 &f, Float_t freq) const;
    1616
    17     Double_t Integral(Int_t i, Double_t x) const;
    18     Double_t Integral(Int_t i) const;
     17    Double_t IntegralBin(Int_t i, Double_t x) const;
     18    Double_t IntegralBin(Int_t i) const;
    1919
    2020public:
  • trunk/MagicSoft/Mars/mbase/Makefile

    r9428 r9518  
    66#
    77##################################################################
     8include ../Makefile.conf.general
    89include ../Makefile.conf.$(OSTYPE)
    9 include ../Makefile.conf.general
    1010
    1111#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.