Changeset 5603 for trunk/MagicSoft


Ignore:
Timestamp:
12/15/04 14:59:24 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5601 r5603  
    4747       this fixed the problem that searching for fPedestals was
    4848       overwritten in MExtractTime
     49
     50   * macros/readrep.C:
     51     - added the missing '.' dot to MTime in a comment
     52
     53   * mhbase/MH3.cc:
     54     - draw profile by default not in blue but in the same color as the
     55       histogram. Use 'BLUE' option to get the old behaviour
     56     - fixed handling of 'same' option
     57     - propagate title of axis to profile histogram
    4958
    5059
  • trunk/MagicSoft/Mars/mhbase/MH3.cc

    r5429 r5603  
    547547//   PROFY: Draw a y-profile into the histogram (for 2D histograms only)
    548548//   ONLY:  Draw the profile histogram only (for 2D histograms only)
     549//   BLUE:  Draw the profile in blue color instead of the histograms line color
    549550//
    550551// If the kIsLog?-Bit is set the axis is displayed lkogarithmically.
     
    565566
    566567    Bool_t only = str.Contains("ONLY", TString::kIgnoreCase) && fDimension==2;
     568    Bool_t same = str.Contains("SAME", TString::kIgnoreCase) && fDimension==2;
     569    Bool_t blue = str.Contains("BLUE", TString::kIgnoreCase) && fDimension==2;
    567570    // FIXME: We may have to remove all our own options from str!
    568571    if (!only)
     
    574577    {
    575578        TProfile *p = ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s");
    576         p->SetLineColor(kBlue);
    577         p->Draw(only?"":"same");
     579        p->UseCurrentStyle();
     580        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
     581        p->Draw(only&&!same?"":"same");
    578582        p->SetBit(kCanDelete);
    579583        p->SetDirectory(NULL);
     584        p->SetXTitle(fHist->GetXaxis()->GetTitle());
     585        p->SetYTitle(fHist->GetYaxis()->GetTitle());
    580586    }
    581587    if (str.Contains("PROFY", TString::kIgnoreCase) && fDimension==2)
     
    583589        TProfile *p = ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s");
    584590        p->UseCurrentStyle();
    585         p->SetLineColor(kBlue);
    586         p->Draw(only?"":"same");
     591        p->SetLineColor(blue ? kBlue : fHist->GetLineColor());
     592        p->Draw(only&&!same?"":"same");
    587593        p->SetBit(kCanDelete);
    588594        p->SetDirectory(NULL);
     595        p->SetYTitle(fHist->GetXaxis()->GetTitle());
     596        p->SetXTitle(fHist->GetYaxis()->GetTitle());
    589597    }
    590598
Note: See TracChangeset for help on using the changeset viewer.