Changeset 11569 for trunk/Mars


Ignore:
Timestamp:
07/24/11 18:36:10 (13 years ago)
Author:
tbretz
Message:
 removed some obsolete calls to Format(); correctly display the relative and absolute error
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mhist/MHCamEvent.cc

    r9576 r11569  
    295295
    296296    pad->cd(2);
    297     if (gPad->FindObject(Format("proj")))
    298     {
    299         TH1 *h=fSum->Projection(Format("proj"));
     297    if (gPad->FindObject("proj"))
     298    {
     299        TH1 *h=fSum->Projection("proj");
    300300        if (h->GetMaximum()>0)
    301301            gPad->SetLogy();
     
    303303
    304304    pad->cd(5);
    305     if (gPad->FindObject(Format("rad")))
    306         fSum->RadialProfile(Format("rad"));
     305    if (gPad->FindObject("rad"))
     306        fSum->RadialProfile("rad");
    307307
    308308    pad->cd(6);
    309     if (gPad->FindObject(Format("az")))
    310         fSum->AzimuthProfile(Format("az"));
     309    if (gPad->FindObject("az"))
     310        fSum->AzimuthProfile("az");
    311311
    312312    pad->cd(4);
    313313    gPad->cd(1);
    314     MHCamera *cam = (MHCamera*)gPad->FindObject(Format("err"));
     314    MHCamera *cam = (MHCamera*)gPad->FindObject("err");
    315315    if (cam)
    316         cam->SetCamContent(*fSum, fErrorRelative ? 1 : 2);
     316        cam->SetCamContent(*fSum, fErrorRelative ? 2 : 1);
    317317}
    318318
     
    340340    p->Draw();
    341341    p->cd();
    342     TH1 *h = fSum->Projection(Format("proj"), 50);
     342    TH1 *h = fSum->Projection("proj", 50);
    343343    h->SetTitle("Projection");
    344344    h->SetBit(kCanDelete);
     
    369369
    370370    fErr = new MHCamera(*fSum->GetGeometry());
    371     fErr->SetName(Format("err"));
     371    fErr->SetName("err");
    372372    fErr->SetTitle(e);
    373373    fErr->SetYTitle(fSum->GetYaxis()->GetTitle());
    374     fErr->SetCamContent(*fSum, fErrorRelative ? 1 : 2);
     374    fErr->SetCamContent(*fSum, fErrorRelative ? 2 : 1);
    375375    fErr->SetBit(kMustCleanup);
    376376    fErr->SetBit(kCanDelete);
     
    384384    p->Draw();
    385385    p->cd();
    386     h = (TH1*)fSum->RadialProfile(Format("rad"), 20);
     386    h = (TH1*)fSum->RadialProfile("rad", 20);
    387387    h->SetTitle("Radial Profile");
    388388    h->SetBit(kCanDelete|TH1::kNoStats);
     
    396396    p->Draw();
    397397    p->cd();
    398     h = (TH1*)fSum->AzimuthProfile(Format("az"), 30);
     398    h = (TH1*)fSum->AzimuthProfile("az", 30);
    399399    h->SetTitle("Azimuth Profile");
    400400    h->SetBit(kCanDelete|TH1::kNoStats);
Note: See TracChangeset for help on using the changeset viewer.