Ignore:
Timestamp:
04/04/05 10:18:01 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r6869 r6907  
    284284void MHNewImagePar::Paint(Option_t *o)
    285285{
    286     if (TString(o)==(TString)"log" && fHistLeakage1.GetMaximum()>0)
    287         gPad->SetLogy();
     286    if (fHistLeakage1.GetMaximum()>0 && gPad->GetPad(1))
     287        gPad->GetPad(1)->SetLogy();
    288288}
    289289
     
    294294// together with the canvas.
    295295//
    296 void MHNewImagePar::Draw(Option_t *)
     296void MHNewImagePar::Draw(Option_t *o)
    297297{
    298298    TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this);
     
    301301    AppendPad("");
    302302
    303     pad->Divide(2,2);
     303    // FIXME: If same-option given make two independant y-axis!
     304    const TString opt(o);
     305    const Bool_t same = opt.Contains("same");
     306
     307    if (!same)
     308        pad->Divide(2,2);
     309    else
     310    {
     311        fHistLeakage1.SetLineColor(kMagenta);
     312        fHistLeakage1.SetLineColor(kCyan);
     313
     314        fHistCorePix.SetLineColor(kMagenta);
     315        fHistUsedPix.SetLineColor(kCyan);
     316
     317        fHistConc1.SetLineColor(kMagenta);
     318        fHistConc.SetLineColor(kCyan);
     319
     320        fHistCoreArea.SetLineColor(kMagenta);
     321        fHistUsedArea.SetLineColor(kCyan);
     322    }
    304323
    305324    pad->cd(1);
     
    307326    TAxis &x = *fHistLeakage1.GetXaxis();
    308327    x.SetRangeUser(0.0, x.GetXmax());
    309     MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2");
     328    MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2", same);
    310329    fHistLeakage1.SetMinimum();
    311330    fHistLeakage2.SetMinimum();
    312331    fHistLeakage2.SetMaximum(0.1);   // dummy value to allow log-scale
    313     AppendPad("log");
    314332
    315333    pad->cd(2);
    316334    gPad->SetBorderMode(0);
    317     MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels");
     335    MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels", same);
    318336
    319337    pad->cd(3);
    320338    gPad->SetBorderMode(0);
    321     MH::DrawSame(fHistConc1, fHistConc, "Concentrations");
     339    MH::DrawSame(fHistConc1, fHistConc, "Concentrations", same);
    322340
    323341    pad->cd(4);
    324342    gPad->SetBorderMode(0);
    325     MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels");
     343    MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels", same);
    326344}
    327345
Note: See TracChangeset for help on using the changeset viewer.