Ignore:
Timestamp:
11/04/03 14:12:44 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mimage/MHillas.cc

    r2386 r2467  
    8282// Default constructor.
    8383//
    84 MHillas::MHillas(const char *name, const char *title) : fEllipse(NULL)
     84MHillas::MHillas(const char *name, const char *title)
    8585{
    8686    fName  = name  ? name  : "MHillas";
     
    8888
    8989    Reset();
    90 
    91     fEllipse = new TEllipse;
    9290}
    9391
     
    9896MHillas::~MHillas()
    9997{
    100     Clear();
    10198}
    10299
     
    115112    fMeanX  =  0;
    116113    fMeanY  =  0;
    117 
    118     Clear();
    119114}
    120115
     
    143138// --------------------------------------------------------------------------
    144139//
    145 // Instead of adding MHillas itself to the Pad (s. AppendPad in TObject)
    146 // we create an ellipse, which is added to the Pad by its Draw function
    147 // You can remove it by deleting the Ellipse Object (s. Clear())
    148 //
    149 void MHillas::Draw(Option_t *opt)
    150 {
    151     Clear();
    152 
     140// Paint the ellipse corresponding to the parameters
     141//
     142void MHillas::Paint(Option_t *opt)
     143{
    153144    if (fLength<0 || fWidth<0)
    154145        return;
    155146
    156     fEllipse = new TEllipse(fMeanX, fMeanY, fLength, fWidth,
     147    TEllipse e(fMeanX, fMeanY, fLength, fWidth,
    157148                            0, 360, fDelta*kRad2Deg+180);
    158149
    159     fEllipse->SetLineWidth(2);
    160     fEllipse->Draw();
    161 }
    162 
    163 // --------------------------------------------------------------------------
    164 //
    165 // If a TEllipse object exists it is deleted
    166 //
    167 void MHillas::Clear(Option_t *)
    168 {
    169     if (!fEllipse)
    170         return;
    171 
    172     delete fEllipse;
    173 
    174     fEllipse = NULL;
    175 }
    176 
     150    e.SetLineWidth(2);
     151    e.Paint();
     152}
    177153
    178154// --------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.