- Timestamp:
- 02/07/09 20:48:57 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9301 r9303 30 30 - changed a comment 31 31 32 * mbase/MEnv.h :32 * mbase/MEnv.h, mbase/MMath.cc: 33 33 - Do not assign a temporary TString to const char * 34 34 … … 37 37 38 38 * 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: 40 47 - use MString::Format instead of Form 41 48 … … 48 55 * msimcamera/MSimPSF.cc: 49 56 - 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 50 79 51 80 -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r9281 r9303 46 46 #include "MHAlpha.h" 47 47 48 #include <TF1.h>49 #include <TGraph.h>50 48 #include <TStyle.h> 51 49 #include <TLatex.h> 52 50 #include <TCanvas.h> 53 51 #include <TPaveStats.h> 54 #include <TStopwatch.h>55 52 56 53 #include "MSrcPosCam.h" … … 82 79 MHAlpha::MHAlpha(const char *name, const char *title) 83 80 : fNameParameter("MHillasSrc"), fParameter(0), 84 fOffData(0), fResult(0), f Energy(0), fBin(0),81 fOffData(0), fResult(0), fSigma(0), fEnergy(0), fBin(0), 85 82 fPointPos(0), fTimeEffOn(0), fTime(0), fNumTimeBins(10), 86 83 fHillas(0), fMatrix(0), fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), … … 100 97 fHist.SetDirectory(NULL); 101 98 fHist.UseCurrentStyle(); 99 fHist.Sumw2(); 102 100 103 101 // Main histogram … … 107 105 fHistTime.UseCurrentStyle(); 108 106 fHistTime.SetDirectory(NULL); 109 107 fHistTime.Sumw2(); 110 108 111 109 fHEnergy.SetName("Excess"); … … 115 113 fHEnergy.SetDirectory(NULL); 116 114 fHEnergy.UseCurrentStyle(); 115 fHEnergy.Sumw2(); 117 116 118 117 fHTheta.SetName("ExcessTheta"); … … 123 122 fHTheta.UseCurrentStyle(); 124 123 fHTheta.SetMinimum(0); 124 fHTheta.Sumw2(); 125 125 126 126 // effective on time versus time … … 1024 1024 pave->SetLabel(title); 1025 1025 1026 char txt[1000]; 1027 TText *ptxt; 1028 sprintf(txt, " "); 1029 ptxt = pave->AddText(txt); 1026 TText *ptxt = pave->AddText(" "); 1030 1027 ptxt->SetTextAlign(23); 1031 1028 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())); 1037 1031 ptxt->SetTextAlign(23); 1038 1032 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())); 1042 1035 ptxt->SetTextAlign(23); 1043 1036 pave->SetBit(kCanDelete); … … 1062 1055 if (!fSkipHistEnergy) 1063 1056 { 1064 *fLog << inf << "Processing energy bins..." << endl;1057 *fLog << inf3 << "Processing energy bins..." << endl; 1065 1058 FitEnergyBins(); 1066 1059 } 1067 1060 if (!fSkipHistTheta) 1068 1061 { 1069 *fLog << inf << "Processing theta bins..." << endl;1062 *fLog << inf3 << "Processing theta bins..." << endl; 1070 1063 FitThetaBins(); 1071 1064 } 1072 1065 if (!fSkipHistTime) 1073 1066 { 1074 *fLog << inf << "Processing time bins..." << endl;1067 *fLog << inf3 << "Processing time bins..." << endl; 1075 1068 UpdateAlphaTime(kTRUE); 1076 1069 MH::RemoveFirstBin(fHTime); … … 1164 1157 return gPad->GetPad(1)->DistancetoPrimitive(px,py)==0 ? 0 : 9999; 1165 1158 } 1159 1160 void MHAlpha::RecursiveRemove(TObject *obj) 1161 { 1162 if (obj==fOffData) 1163 fOffData = 0; 1164 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r9153 r9303 152 152 void Paint(Option_t *opt=""); 153 153 void Draw(Option_t *option=""); 154 void RecursiveRemove(TObject *obj); 154 155 155 156 // MParContainer -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r9292 r9303 280 280 281 281 #include "MTime.h" 282 #include "MString.h" 282 283 #include "MParameters.h" 283 284 #include "MPointingPos.h" … … 609 610 610 611 // 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)); 612 613 613 614 // nbins = number of Theta bins … … 795 796 text.SetTextSize(0.04); 796 797 797 TString txt = Form("T_{eff} = %.1fs \\pm %.1fs", val, error);798 TString txt = MString::Format("T_{eff} = %.1fs \\pm %.1fs", val, error); 798 799 if (range>0) 799 txt += Form(" T_{axe} = %.1fs", range);800 txt += MString::Format(" T_{axe} = %.1fs", range); 800 801 if (fTotalTime>0) 801 txt += Form(" T_{max} = %.1fs", fTotalTime);802 txt += MString::Format(" T_{max} = %.1fs", fTotalTime); 802 803 803 804 text.SetText(0.35, 0.94, txt); … … 807 808 void MHEffectiveOnTime::PaintText(Double_t *res) const 808 809 { 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])); 811 812 text.SetBit(TLatex::kTextNDC); 812 813 text.SetTextSize(0.04); … … 828 829 return; 829 830 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)); 831 832 text.SetBit(TLatex::kTextNDC); 832 833 text.SetTextSize(0.04); -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r9301 r9303 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.2 4 2009-02-07 16:11:57tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.25 2009-02-07 20:47:33 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 243 243 fMm2Deg = geom->GetConvMm2Deg(); 244 244 245 const TString off( Form("%sOff", fName.Data()));245 const TString off(MString::Format("%sOff", fName.Data())); 246 246 if (fName!=off && fHistOff==NULL) 247 247 { 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())); 249 249 MHFalseSource *hoff = (MHFalseSource*)plist->FindObject(off, ClassName()); 250 250 if (!hoff) … … 1143 1143 if (maxx>0 && maxy>0) 1144 1144 { 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); 1148 1148 1149 1149 h = fHist.ProjectionZ("AlphaFit", maxx, maxx, maxy, maxy); -
trunk/MagicSoft/Mars/mhist/MHCamEvent.cc
r9153 r9303 57 57 #include "MLogManip.h" 58 58 59 #include "MString.h" 59 60 #include "MParList.h" 60 61 #include "MCamEvent.h" … … 232 233 233 234 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())); 237 238 if (h->GetMaximum()>0) 238 239 gPad->SetLogy(); … … 240 241 241 242 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())); 244 245 245 246 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())); 248 249 249 250 pad->cd(4); 250 251 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())); 252 253 if (cam) 253 254 cam->SetCamContent(*fSum, fErrorRelative ? 1 : 2); … … 262 263 AppendPad(); 263 264 264 TString name = Form("%s_1", pad->GetName());265 TString name = MString::Format("%s_1", pad->GetName()); 265 266 TPad *p = new TPad(name,name,0.005, 0.5, 0.66, 0.995,col,0,0); 266 267 p->SetFrameBorderMode(0); … … 271 272 272 273 pad->cd(); 273 name = Form("%s_2", pad->GetName());274 name = MString::Format("%s_2", pad->GetName()); 274 275 p = new TPad(name,name,0.66, 0.5, 0.995, 0.995,col,0,0); 275 276 p->SetFrameBorderMode(0); … … 277 278 p->Draw(); 278 279 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); 280 281 h->SetTitle("Projection"); 281 282 h->SetBit(kCanDelete); … … 283 284 284 285 pad->cd(); 285 name = Form("%s_3", pad->GetName());286 name = MString::Format("%s_3", pad->GetName()); 286 287 p = new TPad(name,name,0.005, 0.005, 3./8, 0.5,col,0,0); 287 288 p->SetFrameBorderMode(0); … … 292 293 293 294 pad->cd(); 294 name = Form("%s_4", pad->GetName());295 name = MString::Format("%s_4", pad->GetName()); 295 296 p = new TPad(name,name,3./8, 0.005, 6./8-0.005, 0.5,col,0,0); 296 297 p->SetFrameBorderMode(0); … … 306 307 307 308 MHCamera *cam = new MHCamera(*fSum->GetGeometry()); 308 cam->SetName( Form("%s;err", fName.Data()));309 cam->SetName(MString::Format("%s;err", fName.Data())); 309 310 cam->SetTitle(e); 310 311 cam->SetYTitle(fSum->GetYaxis()->GetTitle()); … … 314 315 315 316 pad->cd(); 316 name = Form("%s_5", pad->GetName());317 name = MString::Format("%s_5", pad->GetName()); 317 318 p = new TPad(name,name,6./8,0.25,0.995,0.5,col,0,0); 318 319 p->SetFrameBorderMode(0); … … 320 321 p->Draw(); 321 322 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); 323 324 h->SetTitle("Radial Profile"); 324 325 h->SetBit(kCanDelete|TH1::kNoStats); … … 326 327 327 328 pad->cd(); 328 name = Form("%s_6", pad->GetName());329 name = MString::Format("%s_6", pad->GetName()); 329 330 p = new TPad(name,name,6./8,0.005,0.995,0.25,col,0,0); 330 331 p->SetFrameBorderMode(0); … … 332 333 p->Draw(); 333 334 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); 335 336 h->SetTitle("Azimuth Profile"); 336 337 h->SetBit(kCanDelete|TH1::kNoStats); -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r9235 r9303 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.11 2 2009-01-21 14:37:07tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.113 2009-02-07 20:47:41 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 77 77 78 78 #include "MH.h" 79 #include "MString.h" 79 80 #include "MBinning.h" 80 81 #include "MHexagon.h" … … 1848 1849 newtxt2.PaintText(-range*.85, -range*.85, text); 1849 1850 1850 text = ""; 1851 text += Form("%.2f", range*.3*fGeomCam->GetConvMm2Deg()); 1852 text += "\\circ"; 1851 text = MString::Format("%.2f\\circ", range*.3*fGeomCam->GetConvMm2Deg()); 1853 1852 text = text.Strip(TString::kLeading); 1854 1853 … … 1881 1880 const Float_t step = (islog && min>0 ? log10(max/min) : max-min); 1882 1881 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)); 1884 1883 /* 1885 1884 for (Int_t i=0; i<ncol+1; i+=3) … … 1898 1897 1899 1898 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])); 1901 1900 1902 1901 for (Int_t i=0; i<ncol; i++) … … 2081 2080 // MHCamera and on the pad on which it is drawn --> The name 2082 2081 // 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); 2084 2083 2085 2084 TCanvas *old = (TCanvas*)gROOT->GetListOfCanvases()->FindObject(name); … … 2375 2374 // Just to get the right (maximum) binning 2376 2375 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())); 2379 2378 2380 2379 for (Int_t i=0; i<2; i++) … … 2420 2419 // Just to get the right (maximum) binning 2421 2420 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())); 2424 2423 2425 2424 for (Int_t i=0; i<2; i++) -
trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.cc
r9153 r9303 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.1 4 2008-11-11 11:42:16tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.cc,v 1.15 2009-02-07 20:47:55 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 350 350 AppendPad(opt); 351 351 } 352 353 void MHSectorVsTime::RecursiveRemove(TObject *obj) 354 { 355 if (obj==fGraph) 356 fGraph = 0; 357 } -
trunk/MagicSoft/Mars/mhvstime/MHSectorVsTime.h
r9153 r9303 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1. 8 2008-11-11 11:42:16tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHSectorVsTime.h,v 1.9 2009-02-07 20:47:52 tbretz Exp $ 3 3 \* ======================================================================== */ 4 4 #ifndef MARS_MHSectorVsTime … … 87 87 void Paint(Option_t *o=NULL); 88 88 89 void RecursiveRemove(TObject *obj); 90 89 91 ClassDef(MHSectorVsTime, 3) // Histogram to sum camera events 90 92 }; -
trunk/MagicSoft/Mars/mjobs/MJSimulation.cc
r9279 r9303 56 56 #include "MSimReflector.h" 57 57 #include "MSimPointingPos.h" 58 #include "MSimPSF.h" 58 59 #include "MSimGeomCam.h" 59 60 #include "MSimSignalCam.h" … … 142 143 hist.SetLog(kTRUE, kTRUE, kFALSE); 143 144 144 hist.AddHist("MPhotonEvent.GetNum Photons");145 hist.AddHist("MPhotonEvent.GetNumExternal"); 145 146 hist.InitName("Size"); 146 147 hist.InitTitle("Size;S [#]"); … … 288 289 MBinning binsvc(155, 0, 31, "BinningViewCone"); 289 290 MBinning binstr(150, -25, 125, "BinningTrigger"); 290 MBinning binsew(150, 0, 150, "BinningEvtWidth");291 MBinning binsew(150, 0, 25, "BinningEvtWidth"); 291 292 292 293 plist.AddToList(&binse); … … 402 403 403 404 MGeomApply apply; 405 406 MSimPSF simpsf; 404 407 405 408 MSimGeomCam simgeom; … … 503 506 if (header.IsDataRun()) 504 507 { 508 tasks.AddToList(&simpsf); 505 509 tasks.AddToList(&simgeom); 506 510 tasks.AddToList(&cont2); -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r9219 r9303 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.6 6 2009-01-14 12:31:36tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MEventDisplay.cc,v 1.67 2009-02-07 20:47:44 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 55 55 // 56 56 #include "MGList.h" // MGList 57 #include "MString.h" 57 58 58 59 #include "MLog.h" … … 442 443 // create gui elements 443 444 // 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))); 445 446 fList->Add(file); 446 447 … … 657 658 // 658 659 *fLog << all; 659 fLog->Separator( Form("Entry %d", reader->GetNumEntry()+1));660 fLog->Separator(MString::Format("Entry %d", reader->GetNumEntry()+1)); 660 661 ((MHillas*) plist->FindObject("MHillas"))->Print(*geom); 661 662 ((MHillasExt*) plist->FindObject("MHillasExt"))->Print(*geom); … … 673 674 674 675 TGTextEntry *entry = (TGTextEntry*)fList->FindWidget(kEvtNumber); 675 entry->SetText( Form("%d", reader->GetNumEntry()+1));676 entry->SetText(MString::Format("%d", reader->GetNumEntry()+1)); 676 677 } 677 678 … … 757 758 758 759 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())); 760 761 fNumOfEvts->SetText(txt); 761 762 … … 838 839 if (!o) 839 840 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))); 841 842 } 842 843 break; -
trunk/MagicSoft/Mars/mmovie/MMovieWrite.cc
r8914 r9303 93 93 #include <TStopwatch.h> 94 94 95 #include "MString.h" 96 95 97 #include "MParList.h" 96 98 #include "MTaskList.h" … … 173 175 174 176 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); 176 178 177 179 // For higher resolution add "--no-constraints" … … 651 653 652 654 // 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)); 654 656 655 657 // Update existing image with new data and encode into pipe … … 660 662 DeletePalette(colidx); 661 663 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; 663 665 664 666 return kTRUE; … … 782 784 */ 783 785 784 TString s = Form("%d: Evt #", GetNumExecutions()+1);786 TString s = MString::Format("%d: Evt #", GetNumExecutions()+1); 785 787 s += fHead->GetDAQEvtNumber(); 786 788 s += " of "; -
trunk/MagicSoft/Mars/mmuon/MHMuonPar.cc
r9153 r9303 54 54 #include "MLogManip.h" 55 55 56 #include "MString.h" 57 56 58 #include "MGeomCam.h" 57 59 #include "MBinning.h" … … 274 276 if (TString(opt)==TString("pad4")) 275 277 { 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)); 278 280 279 281 TLatex text(0.55, 0.93, txt); … … 285 287 if (TString(opt)==TString("pad3")) 286 288 { 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)); 289 291 290 292 TLatex text(0.47, 0.93, txt); -
trunk/MagicSoft/Mars/mreflector/MHReflector.cc
r9278 r9303 226 226 for (int i=1; i<=fHistRad.GetNbinsX(); i++) 227 227 { 228 h = fHistRad.ProjectionY( Form("ProjRad%d", i), i, i, "e");228 h = fHistRad.ProjectionY(MString::Format("ProjRad%d", i), i, i, "e"); 229 229 h->SetDirectory(NULL); 230 230 h->SetBit(kCanDelete); … … 241 241 const TString hi = MMcEvt::GetEnergyStr(xhi); 242 242 243 leg->AddEntry(h, Form("%s - %s", lo.Data(), hi.Data()));243 leg->AddEntry(h, MString::Format("%s - %s", lo.Data(), hi.Data())); 244 244 } 245 245 … … 257 257 for (int i=1; i<=fHistSize.GetNbinsX(); i++) 258 258 { 259 h = fHistSize.ProjectionY( Form("ProjSize%d", i), i, i, "e");259 h = fHistSize.ProjectionY(MString::Format("ProjSize%d", i), i, i, "e"); 260 260 h->SetDirectory(NULL); 261 261 h->SetBit(kCanDelete); … … 297 297 for (int i=1; i<=fHistRad.GetNbinsX(); i++) 298 298 { 299 const TString name = Form("ProjRad%d", i);299 const TString name = MString::Format("ProjRad%d", i); 300 300 if (!gPad->FindObject(name)) 301 301 continue; … … 312 312 for (int i=1; i<=fHistRad.GetNbinsX(); i++) 313 313 { 314 const TString name = Form("ProjSize%d", i);314 const TString name = MString::Format("ProjSize%d", i); 315 315 if (!gPad->FindObject(name)) 316 316 continue;
Note:
See TracChangeset
for help on using the changeset viewer.