Changeset 2557 for trunk/MagicSoft/Mars/mhist/MHCamera.cc
- Timestamp:
- 11/22/03 21:14:14 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2550 r2557 568 568 Update(gPad->GetLogy(), isbox, iscol); 569 569 PaintAxisTitle(); 570 571 if (opt.Contains("pixelindex")) 572 PaintIndices(kFALSE); 573 if (opt.Contains("sectorindex")) 574 PaintIndices(kTRUE); 570 575 } 571 576 … … 627 632 } 628 633 629 void MHCamera:: DrawPixelIndices()634 void MHCamera::PaintIndices(Bool_t sector) 630 635 { 631 636 if (fNcells<=1) 632 637 return; 633 634 // FIXME: Is this correct?635 for (int i=0; i<kItemsLegend; i++)636 fColors[i] = 16;637 638 if (!gPad)639 Draw();640 638 641 639 TText txt; … … 645 643 for (Int_t i=0; i<fNcells-2; i++) 646 644 { 645 const MGeomPix &h = (*fGeomCam)[i]; 646 647 647 TString num; 648 num += i; 649 650 const MGeomPix &h = (*fGeomCam)[i]; 651 TText *nt = txt.DrawText(h.GetX(), h.GetY(), num); 652 nt->SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 653 } 654 } 655 656 void MHCamera::DrawSectorIndices() 657 { 658 if (fNcells<=1) 659 return; 660 661 for (int i=0; i<kItemsLegend; i++) 662 fColors[i] = 16; 663 664 if (!gPad) 665 Draw(); 666 667 TText txt; 668 txt.SetTextFont(122); 669 txt.SetTextAlign(22); // centered/centered 670 671 for (Int_t i=0; i<fNcells-2; i++) 672 { 673 TString num; 674 num += (*fGeomCam)[i].GetSector(); 675 676 const MGeomPix &h = (*fGeomCam)[i]; 677 TText *nt = txt.DrawText(h.GetX(), h.GetY(), num); 678 nt->SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 648 num += sector ? h.GetSector() : i; 649 650 txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 651 txt.PaintText(h.GetX(), h.GetY(), num); 679 652 } 680 653 }
Note:
See TracChangeset
for help on using the changeset viewer.