Changeset 959 for trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
- Timestamp:
- 10/02/01 14:46:56 (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHMcCollectionArea.cc
r957 r959 110 110 void MHMcCollectionArea::DrawAll(Option_t* option) 111 111 { 112 TCanvas *c=new TCanvas(fHistAll->GetName(), fHistAll->GetTitle()); 112 if (!gPad) 113 { 114 if (!gROOT->GetMakeDefCanvas()) 115 return; 116 (gROOT->GetMakeDefCanvas())(); 117 } 118 119 //TCanvas *c=new TCanvas(fHistAll->GetName(), fHistAll->GetTitle()); 113 120 114 121 fHistAll->Draw(option); 115 122 116 c->Modified();117 c->Update();123 gPad->Modified(); 124 gPad->Update(); 118 125 } 119 126 … … 124 131 void MHMcCollectionArea::DrawSel(Option_t* option) 125 132 { 126 TCanvas *c=new TCanvas(fHistSel->GetName(), fHistSel->GetTitle()); 133 if (!gPad) 134 { 135 if (!gROOT->GetMakeDefCanvas()) 136 return; 137 (gROOT->GetMakeDefCanvas())(); 138 } 139 140 //TCanvas *c=new TCanvas(fHistSel->GetName(), fHistSel->GetTitle()); 127 141 128 142 fHistSel->Draw(option); 129 143 130 c->Modified();131 c->Update();144 gPad->Modified(); 145 gPad->Update(); 132 146 } 133 147 … … 157 171 void MHMcCollectionArea::Draw(Option_t* option) 158 172 { 159 TCanvas *c=new TCanvas(fHistCol->GetName(), fHistCol->GetTitle()); 173 if (!gPad) 174 { 175 if (!gROOT->GetMakeDefCanvas()) 176 return; 177 (gROOT->GetMakeDefCanvas())(); 178 } 179 // TCanvas *c=new TCanvas(fHistCol->GetName(), fHistCol->GetTitle()); 160 180 161 181 fHistCol->Draw(option); 162 182 163 c->Modified();164 c->Update();183 gPad->Modified(); 184 gPad->Update(); 165 185 } 166 186
Note:
See TracChangeset
for help on using the changeset viewer.