Hi Aldo,
Implementing a class deriving from THistPainter is OK. The class
TMyHistoPainter should work. It must be known to ROOT and CINT at run time.
As explained by Axel, you have to create a small dictionary for this class.
I am just curious to know why you want to create your own HistPainter?
-missing functionality in the default painter?
-a feature you do not like?
Rene Brun
"Aldo F. Saavedra" wrote:
>
> Hi,
>
> I was wondering if someone could help me with the
> following. I found you could set your own
> painting class using SetPainter function.
>
> So in my code I have included the following:
> TVirtualHistPainter::SetPainter("TMyHistoPainter");
>
> The TMyHistoPainter class is derived from
> THistPainter as shown in the code below.
>
> The problem is that I had not being able
> to set the name to TMyHistoPainter class
> to "TMyHistoPainter" .
>
> One tactic that I tried was
> to let TMyHistoPainter
> inherit TNamed which contains functions
> that allow you to set the classname.
> But during the compilation I had
> the message that the delete function
> was ambiguous. I think both functions
> had the implemented the function.
>
> So my question is how to name TMyHistoPainter
> class "TMyHistoPainter".
>
> At the moment I'm using 3.05/05 in windows.
>
> Any ideas would be greatly appreciated.
>
> // a bit of the code
> // definition of the class
> #include "THistPainter.h"
> #include "Rtypes.h"
>
> class TMyHistoPainter: public THistPainter
> {
>
> public:
> TMyHistoPainter();
>
> ClassDef(TMyHistoPainter,0)
>
> };
>
> // implementation of the class
>
> ClassImp(TMyHistoPainter)
>
> TMyHistoPainter::TMyHistoPainter():THistPainter()
> {// the constructor
>
> }
>
> ***********************************************************
> Aldo F. Saavedra
> ATLAS Collaboration - Pixel Group (Physics Division)
> Lawrence Berkeley National Laboratory
>
> Email: AFSaavedra@lbl.gov
> Phone: 1 510 486 4690
> Fax: 1 510 486 5101
> Postal Address: Lawrence Berkeley National Laboratory
> 1 Cyclotron Rd Mailstop 50B-62222
> Berkeley, CA 94720
> USA
> ***********************************************************
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:12 MET