Changeset 12320 for trunk/FACT++


Ignore:
Timestamp:
10/28/11 21:49:07 (13 years ago)
Author:
tbretz
Message:
Do not set negative axis ranges in handleRateScan.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/gui/FactGui.h

    r12295 r12320  
    26242624        if (fGraphRateScan[0].GetN()==0 || th<=fGraphRateScan[0].GetX()[0])
    26252625        {
    2626             for (int i=0; i<201; i++)
    2627                 fGraphRateScan[i].Set(0);
    2628 
    2629             h->SetBins(1, th-10, th+10);
     2626            h->SetBins(1, th<10 ? 0 : th-10, th+10);
    26302627            h->SetMinimum(1);
    26312628            h->SetMaximum(rates[0]*2);
    26322629
     2630            for (int i=0; i<201; i++)
     2631            {
     2632                fGraphRateScan[i].Set(0);
     2633                fGraphRateScan[i].SetPoint(fGraphRateScan[i].GetN(), th, rates[i]);
     2634            }
     2635
    26332636            c->SetGrid();
    26342637            c->SetLogy();
    2635 
    2636             for (int i=0; i<201; i++)
    2637                 fGraphRateScan[i].SetPoint(fGraphRateScan[i].GetN(), th, rates[i]);
    26382638
    26392639            c->Modified();
Note: See TracChangeset for help on using the changeset viewer.