Changeset 5994 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 01/25/05 14:47:59 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r5142 r5994 286 286 // together with the canvas. 287 287 // 288 void MHHillas::Draw(Option_t * )288 void MHHillas::Draw(Option_t *o) 289 289 { 290 290 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 293 293 AppendPad(""); 294 294 295 pad->Divide(2,3); 295 TString opt(o); 296 opt.ToLower(); 297 298 // FIXME: If same-option given make two independant y-axis! 299 const Bool_t same = opt.Contains("same"); 300 301 if (!same) 302 pad->Divide(2,3); 303 else 304 { 305 fDistC->SetLineColor(kGreen); 306 fSize->SetLineColor(kGreen); 307 fDelta->SetLineColor(kGreen); 308 309 fWidth->SetLineColor(kMagenta); 310 fLength->SetLineColor(kCyan); 311 } 296 312 297 313 pad->cd(1); 298 314 gPad->SetBorderMode(0); 299 MH::DrawSame(*fWidth, *fLength, "Width'n'Length" );315 MH::DrawSame(*fWidth, *fLength, "Width'n'Length", same); 300 316 301 317 pad->cd(2); 302 318 gPad->SetBorderMode(0); 303 fDistC->Draw( );319 fDistC->Draw(same?"same":""); 304 320 305 321 pad->cd(3); … … 307 323 gPad->SetLogx(); 308 324 gPad->SetLogy(); 309 fSize->Draw(); 310 311 pad->cd(4); 312 gPad->SetBorderMode(0); 313 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 314 SetColors(); 315 fCenter->Draw("colz"); 316 if (fGeomCam) 317 { 318 MHCamera *cam = new MHCamera(*fGeomCam); 319 cam->Draw("same"); 320 cam->SetBit(kCanDelete); 325 fSize->Draw(same?"same":""); 326 327 if (!same) 328 { 329 pad->cd(4); 330 gPad->SetBorderMode(0); 331 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 332 SetColors(); 333 fCenter->Draw("colz"); 334 if (fGeomCam) 335 { 336 MHCamera *cam = new MHCamera(*fGeomCam); 337 cam->Draw("same"); 338 cam->SetBit(kCanDelete); 339 } 321 340 } 322 341 323 342 pad->cd(5); 324 343 gPad->SetBorderMode(0); 325 fDelta->Draw( );344 fDelta->Draw(same?"same":""); 326 345 327 346 pad->cd(6); 328 delete gPad; 347 if (gPad && !same) 348 delete gPad; 329 349 330 350 pad->Modified(); -
trunk/MagicSoft/Mars/mimage/MHImagePar.cc
r5142 r5994 136 136 void MHImagePar::Paint(Option_t *o) 137 137 { 138 if (TString(o)==(TString)"log1" && fHistSatHi.GetMaximum()>0) 139 gPad->SetLogy(); 140 if (TString(o)==(TString)"log2" && fHistIslands.GetMaximum()>0) 141 gPad->SetLogy(); 138 /* 139 if (TString(o)==(TString)"log1" && fHistSatHi.GetMaximum()>0) 140 gPad->SetLogy(); 141 if (TString(o)==(TString)"log2" && fHistIslands.GetMaximum()>0) 142 gPad->SetLogy(); 143 */ 144 if (fHistSatHi.GetMaximum()>0 && gPad->GetPad(1)) 145 gPad->GetPad(1)->SetLogy(); 146 if (fHistIslands.GetMaximum()>0 && gPad->GetPad(2)) 147 gPad->GetPad(2)->SetLogy(); 142 148 } 143 149 … … 148 154 // together with the canvas. 149 155 // 150 void MHImagePar::Draw(Option_t * )156 void MHImagePar::Draw(Option_t *o) 151 157 { 152 158 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 155 161 AppendPad(""); 156 162 157 pad->Divide(1,2); 158 159 pad->cd(1); 160 gPad->SetBorderMode(0); 161 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 162 fHistSatHi.SetMinimum(); // switch off to allow log-scale 163 fHistSatLo.SetMinimum(); // switch off to allow log-scale 164 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 165 AppendPad("log1"); 163 TString opt(o); 164 opt.ToLower(); 165 166 // FIXME: If same-option given make two independant y-axis! 167 const Bool_t same = opt.Contains("same"); 168 169 if (!same) 170 pad->Divide(1,2); 171 else 172 fHistIslands.SetLineColor(kGreen); 173 174 if (!same) 175 { 176 pad->cd(1); 177 gPad->SetBorderMode(0); 178 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 179 fHistSatHi.SetMinimum(); // switch off to allow log-scale 180 fHistSatLo.SetMinimum(); // switch off to allow log-scale 181 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 182 //AppendPad("log1"); 183 } 166 184 167 185 pad->cd(2); 168 186 gPad->SetBorderMode(0); 169 fHistIslands.Draw( );170 AppendPad("log2");187 fHistIslands.Draw(same?"same":""); 188 //AppendPad("log2"); 171 189 } 172 190
Note:
See TracChangeset
for help on using the changeset viewer.