[ROOT] Re: ClassDef statement is ignored...

From: Dr. John Krane (jkrane@fnal.gov)
Date: Fri Jun 20 2003 - 16:18:41 MEST


  Sorry, the actual error stream shows that ClassDef is *failing*, not 
that it is ignored:

Error in <ObjDate>: ObjDate inherits from TObject but does not have its 
own ClassDef
In file included from /home/jkrane/treemaker/ObjDate.cpp:2,
                 from /home/jkrane/treemaker/tfe4_16.h:29,
                 from /home/jkrane/treemaker/tfe4_16.cxx:13:
/home/jkrane/treemaker/ObjDate.h:10: parse error before `public'
/home/jkrane/treemaker/ObjDate.h:10: virtual outside class declaration
/home/jkrane/treemaker/ObjDate.h:10: non-member function `TClass* IsA()' 
cannot
   have `const' method qualifier
/home/jkrane/treemaker/ObjDate.h: In function `TClass* IsA()':
/home/jkrane/treemaker/ObjDate.h:10: `ObjDate' undeclared (first use this
   function)
/home/jkrane/treemaker/ObjDate.h:10: (Each undeclared identifier is 
reported
   only once for each function it appears in.)
/home/jkrane/treemaker/ObjDate.h:10: parse error before `::' token
/home/jkrane/treemaker/ObjDate.h:10: warning: no return statement in 
function
   returning non-void
/home/jkrane/treemaker/ObjDate.h: At global scope:
/home/jkrane/treemaker/ObjDate.h:10: virtual outside class declaration
/home/jkrane/treemaker/ObjDate.h:10: virtual outside class declaration
/home/jkrane/treemaker/ObjDate.h: In function `void
   StreamerNVirtual(TBuffer&)':
/home/jkrane/treemaker/ObjDate.h:10: parse error before `::' token
/home/jkrane/treemaker/ObjDate.h: At global scope:
/home/jkrane/treemaker/ObjDate.h:12: `struct ObjDate' used prior to 
declaration
In file included from /home/jkrane/treemaker/tfe4_16.h:29,
                 from /home/jkrane/treemaker/tfe4_16.cxx:13:


-----------------------

Hi,

Has anybody had the problem where ClassDef is correctly in your class 
but it is completely ignored by root?  When I .L ObjDate.cpp, I get

Error in : ObjDate inherits from TObject but does not have its 
own ClassDef

...but it does!  From my header:

#ifndef ObjDate_H
#define ObjDate_H
#include "TObject.h"
// define as v1
ClassDef(ObjDate,1)
class ObjDate : public TObject {
  public:
   ObjDate();

...etc.

Could there be any reason for this behavior?

  	- John



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