Re: [ROOT] DrawClone()

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Oct 27 2003 - 10:34:46 MET


Hi Egon,

It is difficult to answer your question without more information
from your side. In general it is a very bad idea to override the Draw function.
If you want to customize the painting of your own objects, implement
the Paint function of your class.
See Users Guide for more details or:
   http://root.cern.ch/root/HowtoDraw.html


Rene Brun

Egon Pavlica wrote:
> 
> hello to anybody...
> 
> i have made a class from TNamed
> i have added virtual void Draw(Option_t *Option) to draw some histo.
> my class own four TH2F* members.
> 
> When i load file with my class (and libraries) then i use DrawClone in
> TBrowser to call Draw method of my class (i suppose). But if i repeat this
> action, the number of members, my object owns, is added. So after three
> uses of DrawClone i have twelve objects in window "Contents of
> myfile.root"
> 
> So my question is:
> -Did i implemented the wrong method to represent my data?
> 
> ps. I have copied Draw method from TH1.cc
> 
> --
> ------------------------------------------
> Egon Pavlica e-mail:egon.pavlica@p-ng.si
> ------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:16 MET