Changeset 2467 for trunk/MagicSoft


Ignore:
Timestamp:
11/04/03 14:12:44 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2466 r2467  
    3737     - moved code from Do() to Process()
    3838     - added comments
     39
     40   * meventdisp/MGCamDisplay.cc:
     41     - replaced MHillas:Clear() by Removing from ListOfPrimitives
     42     
     43   * mimage/MHillas.[h,cc]:
     44     - removed fEllipse
     45     - removed the Draw function
     46     - added a correct Paint() function
    3947
    4048
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r2421 r2467  
    301301    else
    302302    {
    303         hillas->Clear();
    304303        for (int i=0; i<5; i++)
    305304        {
     305            fCanvas2[i]->GetListOfPrimitives()->Remove(hillas);
    306306            fCanvas2[i]->Modified();
    307307            fCanvas2[i]->Update();
  • 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.