Changeset 5145
- Timestamp:
- 09/29/04 15:58:40 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5144 r5145 19 19 20 20 -*-*- END OF LINE -*-*- 21 2004/09/29: Thomas Bretz 22 23 * mhist/MHEvent.[h,cc]: 24 - enhanced display 25 26 * mmain/MEventDisplay.cc: 27 - adapted to changes in MEventDisplay 28 29 21 30 22 31 2004/09/28: Thomas Bretz -
trunk/MagicSoft/Mars/mhist/MHEvent.cc
r5114 r5145 284 284 } 285 285 286 void MHEvent::Paint(Option_t *) 287 { 288 TVirtualPad *pad = gPad; 289 290 pad->GetPad(2)->cd(1); 291 if (gPad->FindObject(Form("Proj_%p", this))) 292 { 293 TH1 *h=fHist->Projection(Form("Proj_%p", this)); 294 if (h->GetMaximum()>0) 295 gPad->SetLogy(); 296 } 297 298 pad->GetPad(2)->cd(2); 299 if (gPad->FindObject(Form("ProfR_%p", this))) 300 fHist->RadialProfile(Form("ProfR_%p", this)); 301 302 pad->GetPad(2)->cd(3); 303 if (gPad->FindObject(Form("ProfA_%p", this))) 304 fHist->AzimuthProfile(Form("ProfA_%p", this)); 305 } 306 286 307 void MHEvent::Draw(Option_t *) 287 308 { … … 292 313 } 293 314 294 if (!gPad) 295 MakeDefCanvas(this); 315 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 316 pad->SetBorderMode(0); 317 318 AppendPad(); 319 320 pad->Divide(2,1); 321 322 pad->cd(1); 323 gPad->SetPad(0.01, 0.01, 0.75, 0.99); 324 gPad->SetBorderMode(0); 296 325 fHist->Draw(); 297 } 326 327 pad->cd(2); 328 gPad->SetPad(0.75, 0.01, 0.99, 0.99); 329 gPad->SetBorderMode(0); 330 gPad->Divide(1,3); 331 332 pad = gPad; 333 334 pad->cd(1); 335 gPad->SetBorderMode(0); 336 337 TH1 *h = fHist->Projection(Form("Proj_%p", this), 50); 338 h->SetTitle("Projection"); 339 h->SetBit(kCanDelete); 340 h->Draw(); 341 342 pad->cd(2); 343 gPad->SetBorderMode(0); 344 345 h = (TH1*)fHist->RadialProfile(Form("ProfR_%p", this), 20); 346 h->SetTitle("Radial Profile"); 347 h->SetBit(kCanDelete|TH1::kNoStats); 348 h->Draw(); 349 350 pad->cd(3); 351 gPad->SetBorderMode(0); 352 h = (TH1*)fHist->AzimuthProfile(Form("ProfA_%p", this), 30); 353 h->SetTitle("Azimuth Profile"); 354 h->SetBit(kCanDelete|TH1::kNoStats); 355 h->Draw(); 356 } -
trunk/MagicSoft/Mars/mhist/MHEvent.h
r5114 r5145 54 54 55 55 void Draw(Option_t *o=""); 56 void Paint(Option_t *o=""); 56 57 57 58 ClassDef(MHEvent, 1) -
trunk/MagicSoft/Mars/mmain/MEventDisplay.cc
r5143 r5145 631 631 { 632 632 TCanvas *c = GetCanvas(i); 633 c-> cd(1);633 c->GetPad(1)->cd(1); 634 634 hillas1->Draw(); 635 635 hillas2->Draw(); … … 712 712 if (!o) 713 713 break; 714 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(), c->GetPad(1) ));714 fCanvas->SetName(Form("%p;%p;PixelContent", o->GetHist(), c->GetPad(1)->GetPad(1))); 715 715 } 716 716 break;
Note:
See TracChangeset
for help on using the changeset viewer.