Changeset 4828 for trunk/MagicSoft/Mars/mhbase
- Timestamp:
- 09/02/04 14:32:50 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhbase
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhbase/MH3.cc
r2737 r4828 113 113 114 114 fName = gsDefName; 115 fTitle = Form(gsDefTitle.Data(), 1);115 fTitle = Form(gsDefTitle.Data(), fDimension); 116 116 117 117 if (fHist) … … 514 514 */ 515 515 516 /* 517 void MH3::Paint(Option_t *opt) 518 { 519 if (fHist->TestBit(kIsLogx)) pad->SetLogx(); 520 if (fHist->TestBit(kIsLogy)) pad->SetLogy(); 521 if (fHist->TestBit(kIsLogz)) pad->SetLogz(); 522 } 523 */ 524 525 void MH3::Paint(Option_t *o) 526 { 527 TString str(o); 528 529 // FIXME: Do it in Paint() 530 if (str.Contains("COL", TString::kIgnoreCase)) 531 SetColors(); 532 533 if (fHist->TestBit(kIsLogx) && fHist->GetEntries()>0) gPad->SetLogx(); 534 if (fHist->TestBit(kIsLogy) && fHist->GetEntries()>0) gPad->SetLogy(); 535 if (fHist->TestBit(kIsLogz) && fHist->GetEntries()>0) gPad->SetLogz(); 536 537 // Set pretty color palette 538 gStyle->SetPalette(1, 0); 539 540 TVirtualPad *padsave = gPad; 541 542 TProfile* h0; 543 if ((h0 = (TProfile*)gPad->FindObject("_pfx"))) 544 { 545 // Get projection for range 546 TProfile *p = ((TH2*)fHist)->ProfileX("_pfx", -1, 9999, "s"); 547 548 // Move contents from projection to h3 549 h0->Reset(); 550 h0->Add(p); 551 delete p; 552 553 // Set Minimum as minimum value Greater Than 0 554 //h0->SetMinimum(GetMinimumGT(*h0)); 555 } 556 if ((h0 = (TProfile*)gPad->FindObject("_pfy"))) 557 { 558 // Get projection for range 559 TProfile *p = ((TH2*)fHist)->ProfileY("_pfy", -1, 9999, "s"); 560 561 // Move contents from projection to h3 562 h0->Reset(); 563 h0->Add(p); 564 delete p; 565 566 // Set Minimum as minimum value Greater Than 0 567 //h0->SetMinimum(GetMinimumGT(*h0)); 568 } 569 570 gPad = padsave; 571 } 572 516 573 // -------------------------------------------------------------------------- 517 574 // … … 534 591 pad->SetBorderMode(0); 535 592 536 AppendPad("");593 fHist->SetFillStyle(4000); 537 594 538 595 TString str(opt); 539 540 // FIXME: Do it in Paint()541 if (str.Contains("COL", TString::kIgnoreCase))542 SetColors();543 544 fHist->SetFillStyle(4000);545 596 546 597 Bool_t only = str.Contains("ONLY", TString::kIgnoreCase) && fDimension==2; … … 565 616 } 566 617 618 AppendPad(""); 619 /* 567 620 if (fHist->TestBit(kIsLogx)) pad->SetLogx(); 568 621 if (fHist->TestBit(kIsLogy)) pad->SetLogy(); 569 622 if (fHist->TestBit(kIsLogz)) pad->SetLogz(); 570 571 pad->Modified();572 pad->Update();623 */ 624 //pad->Modified(); 625 //pad->Update(); 573 626 } 574 627 -
trunk/MagicSoft/Mars/mhbase/MH3.h
r2737 r4828 41 41 void SetScaleZ(Double_t scale) { fScale[2] = scale; } 42 42 43 void SetLogx(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogx) : fHist->ResetBit(kIsLogx); } 44 void SetLogy(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogy) : fHist->ResetBit(kIsLogy); } 45 void SetLogz(Bool_t b=kTRUE) { b ? fHist->SetBit(kIsLogz) : fHist->ResetBit(kIsLogz); } 46 43 47 Int_t GetDimension() const { return fDimension; } 44 48 Int_t GetNbins() const; … … 61 65 void SetColors() const; 62 66 void Draw(Option_t *opt=NULL); 67 void Paint(Option_t *opt=""); 63 68 64 69 MParContainer *New() const;
Note:
See TracChangeset
for help on using the changeset viewer.