Ignore:
Timestamp:
08/17/07 11:53:49 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbase
Files:
2 edited

Legend:

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

    r8585 r8673  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.36 2007-06-19 11:14:33 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MMath.cc,v 1.37 2007-08-17 10:53:48 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    153153    Double_t sN = s + alpha*alpha*b;
    154154
    155     return Ns<0 || sN<0 ? 0 : Ns/TMath::Sqrt(sN);
     155    if (Ns<0 || sN<0)
     156        return 0;
     157
     158    if (Ns==0 && sN==0)
     159        return 0;
     160
     161    return Ns/TMath::Sqrt(sN);
    156162}
    157163
  • trunk/MagicSoft/Mars/mbase/MStatusDisplay.cc

    r8309 r8673  
    10101010TCanvas &MStatusDisplay::AddTab(const char *name)
    10111011{
     1012    /*
     1013    if (HasCanvas(name))
     1014    {
     1015        *fLog << warn;
     1016        *fLog << "WARNING - A canvas '" << name << "' is already existing in the Status Display." << endl;
     1017        *fLog << "          This can cause unexpected crahes!" << endl;
     1018    }*/
     1019
    10121020    if (gROOT->IsBatch())
    10131021    {
     
    10171025
    10181026        TCanvas *c = new TCanvas(name, name, -cw, ch);
     1027
     1028        gROOT->GetListOfCanvases()->Remove(c);
     1029
    10191030        fBatch->Add(c);
    10201031        return *c;
     
    13421353    if (!c)
    13431354        return kFALSE;
     1355
     1356    // If you encounter unexpected crashes here, check if
     1357    // a canvas is existing twice in the list or has been
     1358    // deleted by accident. (Check AddTab)
    13441359
    13451360    if (gROOT->IsBatch())
Note: See TracChangeset for help on using the changeset viewer.