Ignore:
Timestamp:
10/20/03 18:33:11 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mimage
Files:
6 edited

Legend:

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

    r2320 r2414  
    278278    gStyle->SetPalette(50, c);
    279279}
    280 
     280/*
    281281// --------------------------------------------------------------------------
    282282//
     
    323323    pad->Update();
    324324}
     325*/
     326
     327// --------------------------------------------------------------------------
     328//
     329// Creates a new canvas and draws the four histograms into it.
     330// Be careful: The histograms belongs to this object and won't get deleted
     331// together with the canvas.
     332//
     333void MHHillas::DrawTS(TVirtualPad *p, Option_t *)
     334{
     335    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
     336    pad->SetBorderMode(0);
     337
     338    MParContainer::DrawTS(pad);
     339
     340    pad->Divide(2,3);
     341
     342    p = pad->GetPad(1);
     343    p->SetBorderMode(0);
     344    MH::DrawSame(*fWidth, *fLength, "Width'n'Length", p);
     345
     346    p = pad->GetPad(2);
     347    p->SetBorderMode(0);
     348    MParContainer::DrawTS(fDistC, p);
     349
     350    p = pad->GetPad(3);
     351    p->SetBorderMode(0);
     352    p->SetLogx();
     353    MParContainer::DrawTS(fSize, p);
     354
     355    p = pad->GetPad(4);
     356    p->SetBorderMode(0);
     357    p->SetPad(0.51, 0.01, 0.99, 0.65);
     358    SetColors();
     359    MParContainer::DrawTS(fCenter, p, "colz");
     360
     361    p = pad->GetPad(5);
     362    p->SetBorderMode(0);
     363    MParContainer::DrawTS(fDelta, p);
     364
     365    delete pad->GetPad(6);
     366
     367    pad->Modified();
     368    pad->Update();
     369}
     370
    325371
    326372TH1 *MHHillas::GetHistByName(const TString name)
  • trunk/MagicSoft/Mars/mimage/MHHillas.h

    r2043 r2414  
    5151    TH2F *GetHistCenter() { return fCenter; }
    5252
    53     void Draw(Option_t *opt=NULL);
     53    //void Draw(Option_t *opt=NULL);
     54    void DrawTS(TVirtualPad *pad=NULL, Option_t *opt=NULL);
    5455
    5556    //Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; }
  • trunk/MagicSoft/Mars/mimage/MHHillasExt.cc

    r2320 r2414  
    242242    pad->cd(1);
    243243    gPad->SetBorderMode(0);
    244     MH::Draw(fHM3Long, fHM3Trans, "3^{rd} Moments");
     244    MH::DrawSame(fHM3Long, fHM3Trans, "3^{rd} Moments");
    245245
    246246    pad->cd(2);
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r2320 r2414  
    198198// together with the canvas.
    199199//
    200 void MHHillasSrc::Draw(Option_t *)
    201 {
    202     TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     200void MHHillasSrc::DrawTS(TVirtualPad *p, Option_t *)
     201{
     202    TVirtualPad *pad = p ? p : MakeDefCanvas(this);
    203203    pad->SetBorderMode(0);
    204204
    205     AppendPad("");
     205    //
     206    // Add this object to the given pad
     207    //
     208    MParContainer::DrawTS(pad);
    206209
    207210    // FIXME: Display Source position
    208211
     212    //
     213    // Fill the pad with histograms
     214    //
    209215    pad->Divide(2, 2);
    210216
    211     pad->cd(1);
    212     gPad->SetBorderMode(0);
    213     fAlpha->Draw();
    214 
    215     pad->cd(2);
    216     gPad->SetBorderMode(0);
    217     fDist->Draw();
    218 
    219     pad->cd(4);
    220     gPad->SetBorderMode(0);
    221     //gPad->SetLogy();
    222     fCosDA->Draw();
     217    p = pad->GetPad(1);
     218    p->SetBorderMode(0);
     219    MParContainer::DrawTS(fAlpha, p);
     220
     221    p = pad->GetPad(2);
     222    p->SetBorderMode(0);
     223    MParContainer::DrawTS(fDist, p);
     224
     225    delete pad->GetPad(3);
     226
     227    p = pad->GetPad(4);
     228    p->SetBorderMode(0);
     229    MParContainer::DrawTS(fCosDA, p);
    223230
    224231    pad->Modified();
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.h

    r2100 r2414  
    3535    TH1F *GetHistCosDeltaAlpha() { return fCosDA; }
    3636
    37     void Draw(Option_t *opt=NULL);
     37    //void Draw(Option_t *opt=NULL);
     38    void DrawTS(TVirtualPad *pad=NULL, Option_t *opt=NULL);
    3839    void Paint(Option_t *opt);
    3940
  • trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc

    r2320 r2414  
    191191    TAxis &x = *fHistLeakage1.GetXaxis();
    192192    x.SetRangeUser(0.0, x.GetXmax());
    193     MH::Draw(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2");
     193    MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2");
    194194
    195195    pad->cd(2);
    196196    gPad->SetBorderMode(0);
    197     MH::Draw(fHistCorePix, fHistUsedPix, "Number of core/used Pixels");
     197    MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels");
    198198
    199199    pad->cd(3);
    200200    gPad->SetBorderMode(0);
    201     MH::Draw(fHistConc1, fHistConc, "Concentrations");
     201    MH::DrawSame(fHistConc1, fHistConc, "Concentrations");
    202202
    203203    pad->cd(4);
Note: See TracChangeset for help on using the changeset viewer.