Changeset 5300 for trunk/MagicSoft/Mars/mhbase/MH3.cc
- Timestamp:
- 10/21/04 09:03:53 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH3.cc
r4928 r5300 478 478 479 479 // FIXME: Do it in Paint() 480 if (str.Contains("COL", TString::kIgnoreCase)) 480 /* 481 if (str.Contains("COL", TString::kIgnoreCase)) 482 { 481 483 SetColors(); 482 483 if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx(); 484 if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy(); 485 if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz(); 486 487 // Set pretty color palette 488 gStyle->SetPalette(1, 0); 489 490 TVirtualPad *padsave = gPad; 491 492 TProfile* h0; 493 if ((h0 = (TProfile*)gPad->FindObject(fNameProfX))) 494 { 495 // Get projection for range 496 TProfile *p = ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s"); 497 498 // Move contents from projection to h3 499 h0->Reset(); 500 h0->Add(p); 501 delete p; 502 503 // Set Minimum as minimum value Greater Than 0 504 //h0->SetMinimum(GetMinimumGT(*h0)); 505 } 506 if ((h0 = (TProfile*)gPad->FindObject(fNameProfY))) 507 { 508 // Get projection for range 509 TProfile *p = ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s"); 510 511 // Move contents from projection to h3 512 h0->Reset(); 513 h0->Add(p); 514 delete p; 515 516 // Set Minimum as minimum value Greater Than 0 517 //h0->SetMinimum(GetMinimumGT(*h0)); 518 } 519 520 gPad = padsave; 484 return; 485 } 486 */ 487 488 if (str.Contains("log", TString::kIgnoreCase)) 489 { 490 if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx(); 491 if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy(); 492 if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz(); 493 } 494 495 if (str.Contains("upd", TString::kIgnoreCase)) 496 { 497 498 // Set pretty color palette 499 // gStyle->SetPalette(1, 0); 500 501 TProfile* h0; 502 if ((h0 = (TProfile*)gPad->FindObject(fNameProfX))) 503 ((TH2*)fHist)->ProfileX(fNameProfX, -1, 9999, "s"); 504 if ((h0 = (TProfile*)gPad->FindObject(fNameProfY))) 505 ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s"); 506 } 521 507 } 522 508 … … 550 536 if (!only) 551 537 fHist->Draw(str); 538 539 AppendPad("upd"); 552 540 553 541 if (str.Contains("PROFX", TString::kIgnoreCase) && fDimension==2) … … 562 550 { 563 551 TProfile *p = ((TH2*)fHist)->ProfileY(fNameProfY, -1, 9999, "s"); 552 p->UseCurrentStyle(); 564 553 p->SetLineColor(kBlue); 565 554 p->Draw(only?"":"same"); … … 568 557 } 569 558 570 AppendPad(" ");559 AppendPad("log"); 571 560 } 572 561
Note:
See TracChangeset
for help on using the changeset viewer.