hi ingo,
ClassDef and ClassImp are macros, so don't use a semicolon behind
them. eg. ClassDef(TH1Particle,1) // <short descript>
also, don't #ifdef them with ROOTCINT (you probably had to do it,
because the compiler didn't like the above semicolon - ?). then it should
work.
cheers,
patrick.
On Mon, 24 Jan 2000, Ingo Strauch wrote:
> Hi rooters!
>
> I'm working on a particle class which combines the functionalities of
> the
> TLoretzVector and TAttParticle classes with some own stuff.
>
> Although I'm using 'ClassDef' in my header- and 'ClassImp' in my source
> file,
> ROOT doesn't recognize my class. The command '.class <classname>' gives
> the
> expected results, but for example a gHtml->MakeClass("Myclass") says
> that
> Myclass is unknown. When I use the IsA() function with one instance of
> my
> class I get the output of the TLorentzVector class which I inherit
> from...
>
> Did anyone encounter a similar problem?
>
> TH1Particle.h
> --------------------------------------------------------------
> #ifndef __TH1PARTICLE__
> #define __TH1PARTICLE__
>
> #include<iostream.h>
> #include<string.h>
> #include<TROOT.h>
> #include<TObject.h>
> #include<TLorentzVector.h>
> #include<TAttParticle.h>
>
>
> class TH1Particle : public TLorentzVector
>
> {
>
> private:
> <members>
> public:
> <methods>
>
> #ifdef ROOTCINT
> ClassDef(TH1Particle,1); //<Short Description>
> #endif
> };
>
> <inline functions>
> #endif /*__TH1Particle__ */
> ----------------------------------------------------------------------------
>
> TH1Particle.cc
> -------------------------------------------------------------
> #include"TH1Particle.h"
> #include<iostream.h>
>
> #ifndef ROOT_TNamed
> #include "TNamed.h"
> #endif
>
> #ifdef ROOTCINT
> ClassImp(TH1Particle);
> #endif
>
> <code>
> ----------------------------------------------------------------------------
>
> Ciao,
> Ingo
>
> ----------------------------------------------------------------------------
> Ingo Strauch: DESY, Group H1/AAC1, Room 1c354, Notkestr. 85, 22607
> Hamburg
> strauch@mail.desy.de Tel. +49 40 8998
> 2312
> FAX +49 40 8998
> 4385
> I. Phys. Institut RWTH Aachen, Room 28B210, Sommerfeldstr. 14, 52056
> Aachen
> strauch@toots.physik.rwth-aachen.de Tel. +49 241 80
> 7183
> FAX. +49 241 8888
> 661
> ----------------------------------------------------------------------------
>
-------------------------------------------o-------------------------------
Patrick Decowski |
24-507 | Home: (617)625-9352
Massachusetts Institute of Technology | Cell: (617)308-6737
77 Massachusetts Ave | Office: (617)253-1779
Cambridge, MA 02139-4307 | Fax: (617)253-1755
-------------------------------------------o-------------------------------
http://web.mit.edu/decowski/www/home.html | e-mail: decowski@mit.edu
-------------------------------------------o-------------------------------
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:17 MET