Changeset 8756 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 10/13/07 19:56:29 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r8754 r8756 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.10 5 2007-10-08 15:45:24tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.106 2007-10-13 18:56:27 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 162 162 TObject *MHCamera::Clone(const char *newname) const 163 163 { 164 TH1 *rc = static_cast<TH1*>(TH1D::Clone(newname));164 MHCamera *rc = static_cast<MHCamera*>(TH1D::Clone(newname)); 165 165 rc->SetDirectory(NULL); 166 167 if (rc->fGeomCam && fGeomCam) 168 { 169 delete rc->fGeomCam; 170 rc->fGeomCam = static_cast<MGeomCam*>(fGeomCam->Clone()); 171 } 172 166 173 return rc; 167 174 } … … 571 578 // 'content' Display the relative content aligned to GetMaximum() and 572 579 // GeMinimum() ((val-min)/(max-min)) 580 // 'text' Draw GetBinContent as char 573 581 // 'proj' Display the y-projection of the histogram 574 582 // 'pal0' Use Pretty palette … … 1176 1184 return; 1177 1185 } 1186 if (opt.Contains("text")) 1187 { 1188 PaintIndices(5); 1189 return; 1190 } 1178 1191 } 1179 1192 … … 1301 1314 // 1: sector number 1302 1315 // 2: content 1316 // 5: Assume GetBinContent is a char 1303 1317 // 1304 1318 void MHCamera::PaintIndices(Int_t type) … … 1314 1328 1315 1329 TText txt; 1316 txt.SetTextFont(122); 1330 if (type!=5) 1331 txt.SetTextFont(122); 1317 1332 txt.SetTextAlign(22); // centered/centered 1318 1333 … … 1329 1344 case 3: num += TMath::Nint(fArray[i+1]); break; 1330 1345 case 4: num += fBinEntries[i+1]; break; 1346 case 5: num = (char)TMath::Nint(GetBinContent(i+1)); break; 1331 1347 } 1332 1348
Note:
See TracChangeset
for help on using the changeset viewer.