Ignore:
Timestamp:
04/28/03 09:52:57 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHEnergyTime.cc

    r1330 r2015  
    6262    //   we set the radius range from 0 m to 500 m with 10 m bin --> 50 ybins
    6363
    64  
    6564    fName  = name  ? name  : "MHEnergyTime";
    6665    fTitle = title ? title : "Data to Calculate Collection Area";
     
    9796// --------------------------------------------------------------------------
    9897//
    99 // Delete the three histograms
    100 //
    101 MHEnergyTime::~MHEnergyTime()
    102 {
    103 }
    104 
    105 // --------------------------------------------------------------------------
    106 //
    10798// Fill data into the histogram which contains all showers
    10899//
     
    122113void MHEnergyTime::Draw(Option_t* option)
    123114{
    124     if (!gPad)
    125         MakeDefCanvas(&fHist);
     115    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(fHist);
     116    pad->SetBorderMode(0);
    126117
     118    AppendPad("");
     119
     120    pad->SetLogy();
    127121    fHist.DrawCopy(option);
    128     gPad->SetLogy();
    129122
    130     gPad->Modified();
    131     gPad->Update();
    132 }
    133 
    134 // --------------------------------------------------------------------------
    135 //
    136 // Creates a new canvas and draws the histogram into it.
    137 // Be careful: The histogram belongs to this object and won't get deleted
    138 // together with the canvas.
    139 //
    140 TObject *MHEnergyTime::DrawClone(Option_t* option) const
    141 {
    142     TCanvas *c = MakeDefCanvas(&fHist);
    143 
    144     //
    145     // This is necessary to get the expected bahviour of DrawClone
    146     //
    147     gROOT->SetSelectedPad(NULL);
    148 
    149     ((TH2D&)fHist).DrawCopy(option);
    150     gPad->SetLogy();
    151 
    152     c->Modified();
    153     c->Update();
    154 
    155     return c;
     123    pad->Modified();
     124    pad->Update();
    156125}
    157126
Note: See TracChangeset for help on using the changeset viewer.