Changeset 9303 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 02/07/09 20:48:57 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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++)
Note:
See TracChangeset
for help on using the changeset viewer.