Ignore:
Timestamp:
10/13/07 19:56:29 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r8754 r8756  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.105 2007-10-08 15:45:24 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.106 2007-10-13 18:56:27 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    162162TObject *MHCamera::Clone(const char *newname) const
    163163{
    164     TH1 *rc = static_cast<TH1*>(TH1D::Clone(newname));
     164    MHCamera *rc = static_cast<MHCamera*>(TH1D::Clone(newname));
    165165    rc->SetDirectory(NULL);
     166
     167    if (rc->fGeomCam && fGeomCam)
     168    {
     169        delete rc->fGeomCam;
     170        rc->fGeomCam = static_cast<MGeomCam*>(fGeomCam->Clone());
     171    }
     172
    166173    return rc;
    167174}
     
    571578//   'content'     Display the relative content aligned to GetMaximum() and
    572579//                 GeMinimum() ((val-min)/(max-min))
     580//   'text'        Draw GetBinContent as char
    573581//   'proj'        Display the y-projection of the histogram
    574582//   'pal0'        Use Pretty palette
     
    11761184        return;
    11771185    }
     1186    if (opt.Contains("text"))
     1187    {
     1188        PaintIndices(5);
     1189        return;
     1190    }
    11781191}
    11791192
     
    13011314//  1: sector number
    13021315//  2: content
     1316//  5: Assume GetBinContent is a char
    13031317//
    13041318void MHCamera::PaintIndices(Int_t type)
     
    13141328
    13151329    TText txt;
    1316     txt.SetTextFont(122);
     1330    if (type!=5)
     1331        txt.SetTextFont(122);
    13171332    txt.SetTextAlign(22);   // centered/centered
    13181333
     
    13291344        case 3: num += TMath::Nint(fArray[i+1]); break;
    13301345        case 4: num += fBinEntries[i+1]; break;
     1346        case 5: num = (char)TMath::Nint(GetBinContent(i+1)); break;
    13311347        }
    13321348
Note: See TracChangeset for help on using the changeset viewer.