Changeset 7841 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 08/03/06 18:48:57 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r7491 r7841 271 271 // -------------------------------------------------------------------------- 272 272 // 273 // Setup a inversed deep blue sea palette for the fCenter histogram.274 //275 void MHHillas::SetColors() const276 {277 gStyle->SetPalette(51, NULL);278 Int_t c[50];279 for (int i=0; i<50; i++)280 c[49-i] = gStyle->GetColorPalette(i);281 gStyle->SetPalette(50, c);282 }283 284 // --------------------------------------------------------------------------285 //286 273 // Creates a new canvas and draws the four histograms into it. 287 274 // Be careful: The histograms belongs to this object and won't get deleted … … 344 331 fSize->Draw(same?"same":""); 345 332 346 //if (!same) 347 { 348 pad->cd(4); 349 gPad->SetBorderMode(0); 350 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 351 if (same) 333 pad->cd(4); 334 gPad->SetBorderMode(0); 335 gPad->SetPad(0.51, 0.01, 0.99, 0.65); 336 if (same) 337 { 338 TH2 *h=dynamic_cast<TH2*>(gPad->FindObject("Center")); 339 if (h) 352 340 { 353 /* 354 TH1 *h = dynamic_cast<TH1*>(gPad->FindObject("Center")); 355 if (h) 356 { 357 h->SetDrawOption(""); 358 h->SetMarkerColor(kBlack); 359 }*/ 360 RemoveFromPad("CenterSame"); 361 fCenter->SetMarkerColor(kGreen); 362 fCenter->Draw("same"); 341 h->SetDrawOption(""); 342 h->SetMarkerColor(kBlack); 363 343 } 364 else 365 { 366 //SetColors(); 367 fCenter->Draw(/*"colz"*/); 368 } 369 if (fGeomCam) 370 { 371 MHCamera *cam = new MHCamera(*fGeomCam); 372 cam->Draw("same"); 373 cam->SetBit(kCanDelete); 374 } 344 345 RemoveFromPad("CenterSame"); 346 fCenter->SetMarkerColor(kGreen); 347 fCenter->Draw("same"); 348 } 349 else 350 fCenter->Draw("colz"); 351 352 if (fGeomCam) 353 { 354 MHCamera *cam = new MHCamera(*fGeomCam); 355 cam->Draw("same"); 356 cam->SetBit(kCanDelete); 375 357 } 376 358 … … 383 365 if (gPad && !same) 384 366 delete gPad; 385 386 //pad->Modified();387 //pad->Update();388 367 } 389 368 … … 408 387 void MHHillas::Paint(Option_t *opt) 409 388 { 410 SetColors();389 MH::SetPalette("pretty"); 411 390 MH::Paint(); 412 391 } -
trunk/MagicSoft/Mars/mimage/MHHillas.h
r6977 r7841 23 23 TH1F *fSize; //-> Sum of used pixels 24 24 TH2F *fCenter; //-> Center 25 26 void SetColors() const;27 25 28 26 MGeomCam *fGeomCam; //! Camera geometry for plots (for the moment this is a feature for a loop only!)
Note:
See TracChangeset
for help on using the changeset viewer.