Changeset 9303 for trunk


Ignore:
Timestamp:
02/07/09 20:48:57 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9301 r9303  
    3030     - changed a comment
    3131
    32    * mbase/MEnv.h:
     32   * mbase/MEnv.h, mbase/MMath.cc:
    3333     - Do not assign a temporary TString to const char *
    3434
     
    3737
    3838   * mhflux/MHCollectionArea.cc, mhflux/MHDisp.cc, mhflux/MHEnergyEst.cc,
    39      mhflux/MHFalseSource.cc, mhflux/MHThreshold.cc:
     39     mhflux/MHFalseSource.cc, mhflux/MHThreshold.cc, mhbase/MFillH.cc,
     40     mastro/MAstroCamera.cc, mastro/MAstroCatalog.cc, mbase/MContinue.cc,
     41     mbase/MFilter.cc, mbase/MLog.cc, mbase/MParContainer.cc, mhbase/MH.cc,
     42     mbase/MParEmulated.cc, mbase/MStatusDisplay.cc, mbase/MTime.cc,
     43     mhbase/MH3.cc, mhbase/MHn.cc,mhflux/MHAlpha.cc, mhist/MHCamera.cc,
     44     mhflux/MHEffectiveOnTime.cc, mmuon/MHMuonPar.cc, mmovie/MMovieWrite.cc,
     45     mhflux/MHFalseSource.cc, mhist/MHCamEvent.cc,
     46     mmain/MEventDisplay.cc, mreflector/MHReflector.cc:
    4047     - use MString::Format instead of Form
    4148
     
    4855   * msimcamera/MSimPSF.cc:
    4956     - changed default for fSigma from 1 to -1
     57
     58   * mbase/MContinue.cc:
     59     - changed default title
     60
     61   * mfileio/MWriteRootFile.cc:
     62     - set kMustCleanup bit, otherwise it is not correctly deleted from
     63       the list of cleanups
     64
     65   * mhbase/MH3.[h,cc]:
     66     - added RecursiveRemove
     67
     68   * mhflux/MAlphaFitter.[h,cc]:
     69     - moved code to source file
     70     - improved setting of a new fFunc
     71
     72   * mhflux/MHAlpha.[h,cc], mhvstime/MHSectorVsTime.[h,cc]
     73     - added RecursiveRemove
     74
     75   * mjobs/MJSimulation.cc:
     76     - added MSimPSF
     77     - Show only the non NightSky photons in the size plot
     78     - changed the binning of BinningEvtWidth
    5079
    5180
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.cc

    r9281 r9303  
    4646#include "MHAlpha.h"
    4747
    48 #include <TF1.h>
    49 #include <TGraph.h>
    5048#include <TStyle.h>
    5149#include <TLatex.h>
    5250#include <TCanvas.h>
    5351#include <TPaveStats.h>
    54 #include <TStopwatch.h>
    5552
    5653#include "MSrcPosCam.h"
     
    8279MHAlpha::MHAlpha(const char *name, const char *title)
    8380    : fNameParameter("MHillasSrc"), fParameter(0),
    84     fOffData(0), fResult(0), fEnergy(0), fBin(0),
     81    fOffData(0), fResult(0), fSigma(0), fEnergy(0), fBin(0),
    8582    fPointPos(0), fTimeEffOn(0), fTime(0), fNumTimeBins(10),
    8683    fHillas(0), fMatrix(0), fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE),
     
    10097    fHist.SetDirectory(NULL);
    10198    fHist.UseCurrentStyle();
     99    fHist.Sumw2();
    102100
    103101    // Main histogram
     
    107105    fHistTime.UseCurrentStyle();
    108106    fHistTime.SetDirectory(NULL);
    109 
     107    fHistTime.Sumw2();
    110108
    111109    fHEnergy.SetName("Excess");
     
    115113    fHEnergy.SetDirectory(NULL);
    116114    fHEnergy.UseCurrentStyle();
     115    fHEnergy.Sumw2();
    117116
    118117    fHTheta.SetName("ExcessTheta");
     
    123122    fHTheta.UseCurrentStyle();
    124123    fHTheta.SetMinimum(0);
     124    fHTheta.Sumw2();
    125125
    126126    // effective on time versus time
     
    10241024    pave->SetLabel(title);
    10251025
    1026     char txt[1000];
    1027     TText *ptxt;
    1028     sprintf(txt, " ");
    1029     ptxt = pave->AddText(txt);
     1026    TText *ptxt = pave->AddText(" ");
    10301027    ptxt->SetTextAlign(23);
    10311028
    1032     //sprintf(txt, "Significance %.1f\\sigma,  off-scale %.2f  (\\omega=%.2f\\circ)",
    1033     //        fFit.GetSignificance(), fFit.GetScaleFactor(), fFit.GetGausSigma());
    1034     sprintf(txt, "Significance %.1f\\sigma,  off-scale %.2f",
    1035             fit.GetSignificance(), fit.GetScaleFactor());
    1036     ptxt = pave->AddText(txt);
     1029    ptxt = pave->AddText(MString::Format("Significance %.1f\\sigma,  off-scale %.2f",
     1030                                         fit.GetSignificance(), fit.GetScaleFactor()));
    10371031    ptxt->SetTextAlign(23);
    10381032
    1039     sprintf(txt, "%.1f excess events,  %.1f background events",
    1040             fit.GetEventsExcess(), fit.GetEventsBackground());
    1041     ptxt = pave->AddText(txt);
     1033    ptxt = pave->AddText(MString::Format("%.1f excess events,  %.1f background events",
     1034                                         fit.GetEventsExcess(), fit.GetEventsBackground()));
    10421035    ptxt->SetTextAlign(23);
    10431036    pave->SetBit(kCanDelete);
     
    10621055    if (!fSkipHistEnergy)
    10631056    {
    1064         *fLog << inf << "Processing energy bins..." << endl;
     1057        *fLog << inf3 << "Processing energy bins..." << endl;
    10651058        FitEnergyBins();
    10661059    }
    10671060    if (!fSkipHistTheta)
    10681061    {
    1069         *fLog << inf << "Processing theta bins..." << endl;
     1062        *fLog << inf3 << "Processing theta bins..." << endl;
    10701063        FitThetaBins();
    10711064    }
    10721065    if (!fSkipHistTime)
    10731066    {
    1074         *fLog << inf << "Processing time bins..." << endl;
     1067        *fLog << inf3 << "Processing time bins..." << endl;
    10751068        UpdateAlphaTime(kTRUE);
    10761069        MH::RemoveFirstBin(fHTime);
     
    11641157    return gPad->GetPad(1)->DistancetoPrimitive(px,py)==0 ? 0 : 9999;
    11651158}
     1159
     1160void MHAlpha::RecursiveRemove(TObject *obj)
     1161{
     1162    if (obj==fOffData)
     1163        fOffData = 0;
     1164}
  • trunk/MagicSoft/Mars/mhflux/MHAlpha.h

    r9153 r9303  
    152152    void Paint(Option_t *opt="");
    153153    void Draw(Option_t *option="");
     154    void RecursiveRemove(TObject *obj);
    154155
    155156    // MParContainer
  • trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc

    r9292 r9303  
    280280
    281281#include "MTime.h"
     282#include "MString.h"
    282283#include "MParameters.h"
    283284#include "MPointingPos.h"
     
    609610
    610611    // Use a random name to make sure the object is unique
    611     const TString name = Form("CalcTheta%d", (UInt_t)gRandom->Uniform(999999999));
     612    const TString name = MString::Format("CalcTheta%d", (UInt_t)gRandom->Uniform(999999999));
    612613
    613614    // nbins = number of Theta bins
     
    795796    text.SetTextSize(0.04);
    796797
    797     TString txt = Form("T_{eff} = %.1fs \\pm %.1fs", val, error);
     798    TString txt = MString::Format("T_{eff} = %.1fs \\pm %.1fs", val, error);
    798799    if (range>0)
    799         txt += Form("     T_{axe} = %.1fs", range);
     800        txt += MString::Format("     T_{axe} = %.1fs", range);
    800801    if (fTotalTime>0)
    801         txt += Form("     T_{max} = %.1fs", fTotalTime);
     802        txt += MString::Format("     T_{max} = %.1fs", fTotalTime);
    802803
    803804    text.SetText(0.35, 0.94, txt);
     
    807808void MHEffectiveOnTime::PaintText(Double_t *res) const
    808809{
    809     TLatex text(0.27, 0.94, Form("T_{eff}=%.1fs\\pm%.1fs  \\lambda=%.1f\\pm%.1fHz  p=%.1f%%  \\chi^{2}/%d=%.1f",
    810                                  res[0], res[1], res[3], res[4], res[2], (int)res[5], res[6]/res[5]));
     810    TLatex text(0.27, 0.94, MString::Format("T_{eff}=%.1fs\\pm%.1fs  \\lambda=%.1f\\pm%.1fHz  p=%.1f%%  \\chi^{2}/%d=%.1f",
     811                                            res[0], res[1], res[3], res[4], res[2], (int)res[5], res[6]/res[5]));
    811812    text.SetBit(TLatex::kTextNDC);
    812813    text.SetTextSize(0.04);
     
    828829        return;
    829830
    830     TLatex text(0.47, 0.94, Form("\\bar{p} = %.1f%%", sum/n));
     831    TLatex text(0.47, 0.94, MString::Format("\\bar{p} = %.1f%%", sum/n));
    831832    text.SetBit(TLatex::kTextNDC);
    832833    text.SetTextSize(0.04);
  • trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc

    r9301 r9303  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.24 2009-02-07 16:11:57 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.25 2009-02-07 20:47:33 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    243243    fMm2Deg = geom->GetConvMm2Deg();
    244244
    245     const TString off(Form("%sOff", fName.Data()));
     245    const TString off(MString::Format("%sOff", fName.Data()));
    246246    if (fName!=off && fHistOff==NULL)
    247247    {
    248         const TString desc(Form("%s [%s] found... using ", off.Data(), ClassName()));
     248        const TString desc(MString::Format("%s [%s] found... using ", off.Data(), ClassName()));
    249249        MHFalseSource *hoff = (MHFalseSource*)plist->FindObject(off, ClassName());
    250250        if (!hoff)
     
    11431143    if (maxx>0 && maxy>0)
    11441144    {
    1145         const char *title = MString::Format(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ",
    1146                                             hist->GetXaxis()->GetBinCenter(maxx),
    1147                                             hist->GetYaxis()->GetBinCenter(maxy), maxs);
     1145        const TString title = MString::Format(" \\alpha for x=%.2f y=%.2f (S_{max}=%.1f\\sigma) ",
     1146                                              hist->GetXaxis()->GetBinCenter(maxx),
     1147                                              hist->GetYaxis()->GetBinCenter(maxy), maxs);
    11481148
    11491149        h = fHist.ProjectionZ("AlphaFit", maxx, maxx, maxy, maxy);
  • trunk/MagicSoft/Mars/mhist/MHCamEvent.cc

    r9153 r9303  
    5757#include "MLogManip.h"
    5858
     59#include "MString.h"
    5960#include "MParList.h"
    6061#include "MCamEvent.h"
     
    232233
    233234    pad->cd(2);
    234     if (gPad->FindObject(Form("%s;proj", fName.Data())))
    235     {
    236         TH1 *h=fSum->Projection(Form("%s;proj", fName.Data()));
     235    if (gPad->FindObject(MString::Format("%s;proj", fName.Data())))
     236    {
     237        TH1 *h=fSum->Projection(MString::Format("%s;proj", fName.Data()));
    237238        if (h->GetMaximum()>0)
    238239            gPad->SetLogy();
     
    240241
    241242    pad->cd(5);
    242     if (gPad->FindObject(Form("%s;rad", fName.Data())))
    243         fSum->RadialProfile(Form("%s;rad", fName.Data()));
     243    if (gPad->FindObject(MString::Format("%s;rad", fName.Data())))
     244        fSum->RadialProfile(MString::Format("%s;rad", fName.Data()));
    244245
    245246    pad->cd(6);
    246     if (gPad->FindObject(Form("%s;az", fName.Data())))
    247         fSum->AzimuthProfile(Form("%s;az", fName.Data()));
     247    if (gPad->FindObject(MString::Format("%s;az", fName.Data())))
     248        fSum->AzimuthProfile(MString::Format("%s;az", fName.Data()));
    248249
    249250    pad->cd(4);
    250251    gPad->cd(1);
    251     MHCamera *cam = (MHCamera*)gPad->FindObject(Form("%s;err", fName.Data()));
     252    MHCamera *cam = (MHCamera*)gPad->FindObject(MString::Format("%s;err", fName.Data()));
    252253    if (cam)
    253254        cam->SetCamContent(*fSum, fErrorRelative ? 1 : 2);
     
    262263    AppendPad();
    263264
    264     TString name = Form("%s_1", pad->GetName());
     265    TString name = MString::Format("%s_1", pad->GetName());
    265266    TPad *p = new TPad(name,name,0.005, 0.5, 0.66, 0.995,col,0,0);
    266267    p->SetFrameBorderMode(0);
     
    271272
    272273    pad->cd();
    273     name = Form("%s_2", pad->GetName());
     274    name = MString::Format("%s_2", pad->GetName());
    274275    p = new TPad(name,name,0.66, 0.5, 0.995, 0.995,col,0,0);
    275276    p->SetFrameBorderMode(0);
     
    277278    p->Draw();
    278279    p->cd();
    279     TH1 *h = fSum->Projection(Form("%s;proj", fName.Data()), 50);
     280    TH1 *h = fSum->Projection(MString::Format("%s;proj", fName.Data()), 50);
    280281    h->SetTitle("Projection");
    281282    h->SetBit(kCanDelete);
     
    283284
    284285    pad->cd();
    285     name = Form("%s_3", pad->GetName());
     286    name = MString::Format("%s_3", pad->GetName());
    286287    p = new TPad(name,name,0.005, 0.005, 3./8, 0.5,col,0,0);
    287288    p->SetFrameBorderMode(0);
     
    292293
    293294    pad->cd();
    294     name = Form("%s_4", pad->GetName());
     295    name = MString::Format("%s_4", pad->GetName());
    295296    p = new TPad(name,name,3./8, 0.005, 6./8-0.005, 0.5,col,0,0);
    296297    p->SetFrameBorderMode(0);
     
    306307
    307308    MHCamera *cam = new MHCamera(*fSum->GetGeometry());
    308     cam->SetName(Form("%s;err", fName.Data()));
     309    cam->SetName(MString::Format("%s;err", fName.Data()));
    309310    cam->SetTitle(e);
    310311    cam->SetYTitle(fSum->GetYaxis()->GetTitle());
     
    314315
    315316    pad->cd();
    316     name = Form("%s_5", pad->GetName());
     317    name = MString::Format("%s_5", pad->GetName());
    317318    p = new TPad(name,name,6./8,0.25,0.995,0.5,col,0,0);
    318319    p->SetFrameBorderMode(0);
     
    320321    p->Draw();
    321322    p->cd();
    322     h = (TH1*)fSum->RadialProfile(Form("%s;rad", fName.Data()), 20);
     323    h = (TH1*)fSum->RadialProfile(MString::Format("%s;rad", fName.Data()), 20);
    323324    h->SetTitle("Radial Profile");
    324325    h->SetBit(kCanDelete|TH1::kNoStats);
     
    326327
    327328    pad->cd();
    328     name = Form("%s_6", pad->GetName());
     329    name = MString::Format("%s_6", pad->GetName());
    329330    p = new TPad(name,name,6./8,0.005,0.995,0.25,col,0,0);
    330331    p->SetFrameBorderMode(0);
     
    332333    p->Draw();
    333334    p->cd();
    334     h = (TH1*)fSum->AzimuthProfile(Form("%s;az", fName.Data()), 30);
     335    h = (TH1*)fSum->AzimuthProfile(MString::Format("%s;az", fName.Data()), 30);
    335336    h->SetTitle("Azimuth Profile");
    336337    h->SetBit(kCanDelete|TH1::kNoStats);
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r9235 r9303  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.112 2009-01-21 14:37:07 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.113 2009-02-07 20:47:41 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    7777
    7878#include "MH.h"
     79#include "MString.h"
    7980#include "MBinning.h"
    8081#include "MHexagon.h"
     
    18481849        newtxt2.PaintText(-range*.85, -range*.85, text);
    18491850
    1850         text = "";
    1851         text += Form("%.2f", range*.3*fGeomCam->GetConvMm2Deg());
    1852         text += "\\circ";
     1851        text = MString::Format("%.2f\\circ", range*.3*fGeomCam->GetConvMm2Deg());
    18531852        text = text.Strip(TString::kLeading);
    18541853
     
    18811880        const Float_t step   = (islog && min>0 ? log10(max/min) : max-min);
    18821881        const Int_t   firsts = step/48*3 < 1e-8 ? 8 : (Int_t)floor(log10(step/48*3));
    1883         const TString opt    = Form("%%.%if", firsts>0 ? 0 : TMath::Abs(firsts));
     1882        const TString opt    = MString::Format("%%.%if", firsts>0 ? 0 : TMath::Abs(firsts));
    18841883/*
    18851884        for (Int_t i=0; i<ncol+1; i+=3)
     
    18981897
    18991898        for (Int_t i=0; i<=25; i++)
    1900             newtxt.PaintText(range+1.5*w, H*(i*ncol/25*h-1)-offset, Form(opt, bins[i]));
     1899            newtxt.PaintText(range+1.5*w, H*(i*ncol/25*h-1)-offset, MString::Format(opt, bins[i]));
    19011900
    19021901        for (Int_t i=0; i<ncol; i++)
     
    20812080        // MHCamera and on the pad on which it is drawn --> The name
    20822081        // is unique. For ExecuteEvent gPad is always correctly set.
    2083         const TString name = Form("%p;%p;PixelContent", this, gPad);
     2082        const TString name = MString::Format("%p;%p;PixelContent", this, gPad);
    20842083
    20852084        TCanvas *old = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(name);
     
    23752374        // Just to get the right (maximum) binning
    23762375        TProfile *half[2];
    2377         half[0] = RadialProfileS(s0, inner,Form("%sInner",GetName()));
    2378         half[1] = RadialProfileS(s0, outer,Form("%sOuter",GetName()));
     2376        half[0] = RadialProfileS(s0, inner, MString::Format("%sInner",GetName()));
     2377        half[1] = RadialProfileS(s0, outer, MString::Format("%sOuter",GetName()));
    23792378
    23802379        for (Int_t i=0; i<2; i++)
     
    24202419        // Just to get the right (maximum) binning
    24212420        TProfile *half[2];
    2422         half[0] = AzimuthProfileA(inner,Form("%sInner",GetName()));
    2423         half[1] = AzimuthProfileA(outer,Form("%sOuter",GetName()));
     2421        half[0] = AzimuthProfileA(inner, MString::Format("%sInner",GetName()));
     2422        half[1] = AzimuthProfileA(outer, MString::Format("%sOuter",GetName()));
    24242423
    24252424        for (Int_t i=0; i<2; i++)
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc

    r9153 r9303  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.14 2008-11-11 11:42:16 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.15 2009-02-07 20:47:55 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    350350    AppendPad(opt);
    351351}
     352
     353void MHSectorVsTime::RecursiveRemove(TObject *obj)
     354{
     355    if (obj==fGraph)
     356        fGraph = 0;
     357}
  • trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h

    r9153 r9303  
    11/* ======================================================================== *\
    2 !  $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1.8 2008-11-11 11:42:16 tbretz Exp $
     2!  $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1.9 2009-02-07 20:47:52 tbretz Exp $
    33\* ======================================================================== */
    44#ifndef MARS_MHSectorVsTime
     
    8787    void Paint(Option_t *o=NULL);
    8888
     89    void RecursiveRemove(TObject *obj);
     90
    8991    ClassDef(MHSectorVsTime, 3) // Histogram to sum camera events
    9092};
  • trunk/MagicSoft/Mars/mjobs/MJSimulation.cc

    r9279 r9303  
    5656#include "MSimReflector.h"
    5757#include "MSimPointingPos.h"
     58#include "MSimPSF.h"
    5859#include "MSimGeomCam.h"
    5960#include "MSimSignalCam.h"
     
    142143    hist.SetLog(kTRUE, kTRUE, kFALSE);
    143144
    144     hist.AddHist("MPhotonEvent.GetNumPhotons");
     145    hist.AddHist("MPhotonEvent.GetNumExternal");
    145146    hist.InitName("Size");
    146147    hist.InitTitle("Size;S [#]");
     
    288289    MBinning binsvc(155,     0,       31, "BinningViewCone");
    289290    MBinning binstr(150,   -25,      125, "BinningTrigger");
    290     MBinning binsew(150,     0,      150, "BinningEvtWidth");
     291    MBinning binsew(150,     0,       25, "BinningEvtWidth");
    291292
    292293    plist.AddToList(&binse);
     
    402403
    403404    MGeomApply apply;
     405
     406    MSimPSF simpsf;
    404407
    405408    MSimGeomCam simgeom;
     
    503506    if (header.IsDataRun())
    504507    {
     508        tasks.AddToList(&simpsf);
    505509        tasks.AddToList(&simgeom);
    506510        tasks.AddToList(&cont2);
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.cc

    r9219 r9303  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.66 2009-01-14 12:31:36 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.67 2009-02-07 20:47:44 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    5555//
    5656#include "MGList.h"              // MGList
     57#include "MString.h"
    5758
    5859#include "MLog.h"
     
    442443    // create gui elements
    443444    //
    444     TGLabel *file = new TGLabel(top1, new TGString(Form("%s#%s", filename, treename)));
     445    TGLabel *file = new TGLabel(top1, new TGString(MString::Format("%s#%s", filename, treename)));
    445446    fList->Add(file);
    446447
     
    657658    //
    658659    *fLog << all;
    659     fLog->Separator(Form("Entry %d", reader->GetNumEntry()+1));
     660    fLog->Separator(MString::Format("Entry %d", reader->GetNumEntry()+1));
    660661    ((MHillas*)     plist->FindObject("MHillas"))->Print(*geom);
    661662    ((MHillasExt*)  plist->FindObject("MHillasExt"))->Print(*geom);
     
    673674
    674675    TGTextEntry *entry = (TGTextEntry*)fList->FindWidget(kEvtNumber);
    675     entry->SetText(Form("%d", reader->GetNumEntry()+1));
     676    entry->SetText(MString::Format("%d", reader->GetNumEntry()+1));
    676677}
    677678
     
    757758
    758759    MReadTree *reader = (MReadTree*)fEvtLoop->FindTask("MRead");
    759     TGString *txt = new TGString(Form("of %d", reader->GetEntries()));
     760    TGString *txt = new TGString(MString::Format("of %d", reader->GetEntries()));
    760761    fNumOfEvts->SetText(txt);
    761762
     
    838839                if (!o)
    839840                    break;
    840                 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(), c->GetPad(1)->GetPad(1)));
     841                fCanvas->SetName(MString::Format("%p;%p;PixelContent", o->GetHist(), c->GetPad(1)->GetPad(1)));
    841842            }
    842843            break;
  • trunk/MagicSoft/Mars/mmovie/MMovieWrite.cc

    r8914 r9303  
    9393#include <TStopwatch.h>
    9494
     95#include "MString.h"
     96
    9597#include "MParList.h"
    9698#include "MTaskList.h"
     
    173175
    174176    name += " -f 9 -E 40 -r 0 -K kvcd ";
    175     name += Form("-g %d -G %d", n, n);
     177    name += MString::Format("-g %d -G %d", n, n);
    176178
    177179    // For higher resolution add "--no-constraints"
     
    651653
    652654        // Set new name to be displayed
    653         h.SetName(Form("%d: %.2f/%.1fns", i+1, t*freq, t));
     655        h.SetName(MString::Format("%d: %.2f/%.1fns", i+1, t*freq, t));
    654656
    655657        // Update existing image with new data and encode into pipe
     
    660662    DeletePalette(colidx);
    661663
    662     cout << setw(3) << GetNumExecutions() << ": " << Form("%6.2f", (float)numframes/(slices-2)) << " f/sl " << slices << " " << numframes+1 << endl;
     664    cout << setw(3) << GetNumExecutions() << ": " << MString::Format("%6.2f", (float)numframes/(slices-2)) << " f/sl " << slices << " " << numframes+1 << endl;
    663665
    664666    return kTRUE;
     
    782784    */
    783785
    784     TString s = Form("%d:  Evt #", GetNumExecutions()+1);
     786    TString s = MString::Format("%d:  Evt #", GetNumExecutions()+1);
    785787    s += fHead->GetDAQEvtNumber();
    786788    s += " of ";
  • trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc

    r9153 r9303  
    5454#include "MLogManip.h"
    5555
     56#include "MString.h"
     57
    5658#include "MGeomCam.h"
    5759#include "MBinning.h"
     
    274276    if (TString(opt)==TString("pad4"))
    275277    {
    276         const TString txt = Form("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.3f",
    277                                  fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad));
     278        const TString txt = MString::Format("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.3f",
     279                                            fgIntegralLoLim, fgIntegralUpLim, Integral(fHistBroad));
    278280
    279281        TLatex text(0.55, 0.93, txt);
     
    285287    if (TString(opt)==TString("pad3"))
    286288    {
    287         const TString txt = Form("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.f",
    288                                  fgIntegralLoLim, fgIntegralUpLim, Integral(fHistSize));
     289        const TString txt = MString::Format("\\Sigma_{%.2f\\circ}^{%.2f\\circ} = %.f",
     290                                            fgIntegralLoLim, fgIntegralUpLim, Integral(fHistSize));
    289291
    290292        TLatex text(0.47, 0.93, txt);
  • trunk/MagicSoft/Mars/mreflector/MHReflector.cc

    r9278 r9303  
    226226    for (int i=1; i<=fHistRad.GetNbinsX(); i++)
    227227    {
    228         h = fHistRad.ProjectionY(Form("ProjRad%d", i), i, i, "e");
     228        h = fHistRad.ProjectionY(MString::Format("ProjRad%d", i), i, i, "e");
    229229        h->SetDirectory(NULL);
    230230        h->SetBit(kCanDelete);
     
    241241        const TString hi = MMcEvt::GetEnergyStr(xhi);
    242242
    243         leg->AddEntry(h, Form("%s - %s", lo.Data(), hi.Data()));
     243        leg->AddEntry(h, MString::Format("%s - %s", lo.Data(), hi.Data()));
    244244    }
    245245
     
    257257    for (int i=1; i<=fHistSize.GetNbinsX(); i++)
    258258    {
    259         h = fHistSize.ProjectionY(Form("ProjSize%d", i), i, i, "e");
     259        h = fHistSize.ProjectionY(MString::Format("ProjSize%d", i), i, i, "e");
    260260        h->SetDirectory(NULL);
    261261        h->SetBit(kCanDelete);
     
    297297    for (int i=1; i<=fHistRad.GetNbinsX(); i++)
    298298    {
    299         const TString name = Form("ProjRad%d", i);
     299        const TString name = MString::Format("ProjRad%d", i);
    300300        if (!gPad->FindObject(name))
    301301            continue;
     
    312312    for (int i=1; i<=fHistRad.GetNbinsX(); i++)
    313313    {
    314         const TString name = Form("ProjSize%d", i);
     314        const TString name = MString::Format("ProjSize%d", i);
    315315        if (!gPad->FindObject(name))
    316316            continue;
Note: See TracChangeset for help on using the changeset viewer.