Changeset 7742 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 05/24/06 18:37:44 (19 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r7712 r7742 643 643 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); 644 644 645 /* 646 if (TString(opt).Contains("sizebins", TString::kIgnoreCase)) 647 { 648 AppendPad("sizebins"); 649 return; 650 } 651 */ 652 645 653 // Do the projection before painting the histograms into 646 654 // the individual pads … … 759 767 } 760 768 761 void MHAlpha::DrawAll( )769 void MHAlpha::DrawAll(Bool_t newc) 762 770 { 763 771 // FIXME: Do in Paint if special option given! 764 TCanvas *c = new TCanvas;772 TCanvas &c = newc || !fDisplay ? *new TCanvas : fDisplay->AddTab("SizeBins"); 765 773 Int_t n = fHist.GetNbinsY(); 766 774 Int_t nc = (Int_t)(TMath::Sqrt((Float_t)n-1)+1); 767 c->Divide(nc, nc, 1e-10, 1e-10); 775 c.Divide(nc, nc, 1e-10, 1e-10); 776 gPad->SetBorderMode(0); 777 gPad->SetFrameBorderMode(0); 768 778 769 779 // Do not store the 'final' result in fFit … … 772 782 for (int i=1; i<=fHist.GetNbinsY(); i++) 773 783 { 774 c->cd(i); 784 c.cd(i); 785 gPad->SetBorderMode(0); 786 gPad->SetFrameBorderMode(0); 775 787 776 788 TH1D *hon = fHist.ProjectionZ("Proj", -1, 9999, i, i, "E"); … … 878 890 } 879 891 892 if (fOffData) 893 DrawAll(kFALSE); 894 880 895 return kTRUE; 881 896 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r7719 r7742 128 128 void ForceUsingSize(Bool_t b=kTRUE) { fForceUsingSize=b; } 129 129 130 void DrawAll(); //*MENU* 130 void DrawAll() { DrawAll(kTRUE); } //*MENU* 131 void DrawAll(Bool_t newc); 131 132 132 133 virtual void InitMapping(MHMatrix *mat, Int_t type=0);
Note:
See TracChangeset
for help on using the changeset viewer.