Re: ROOT-5.24.00 vs ROOT-5.22.00 with reflex dictionary

From: Roel Aaij <Roel.Aaij_at_cern.ch>
Date: Thu, 12 Nov 2009 08:24:25 +0100


Hi Xinchun,

> The reflex dictionary was generated successfully with ROOT-5.22.00(a,c), but with the following errors with 5.24.00, 5.24.00b and 5.25.02. Any help? Thank.
> The OS is SL Fermi 5.2/4.6, GCC4.1.2/3.4.6, similar on mac 10.5.8.
>
> # Now trying [make] in /home/tianxc/offline/nova-trunk/fmwk/EventDataModel/cmt (9/17)
> #--------------------------------------------------------------
> ..............snipped..................
> #CMT---> (constituents.make) install_more_includes done
> #CMT---> (constituents.make) Building EventDataModelGen.make
> #CMT---> Info: Document EventDataModelGen
> #CMT---> (constituents.make) Creating EventDataModelGen.lock and Starting EventDataModelGen
> ../x86_64-sl5-gcc41-dbg/dict/EventDataModel/dict_dict.cpp dict.h
> --->> genreflex: INFO: Parsing file /home/tianxc/offline/nova-trunk/fmwk/EventDataModel/dict/dict.h with GCC_XML OK
> --->> genreflex: INFO: Generating Reflex Dictionary
> --->> genreflex: ERROR: class edm::EventHeader derives from TObject but does not use ClassDef!
> --->> You MUST put ClassDef(edm::EventHeader, 1); into the class definition.
> --->> genreflex: ERROR: class edm::Event derives from TObject but does not use ClassDef!
> --->> You MUST put ClassDef(edm::Event, 1); into the class definition.

All ROOT objects inherit from TObject and contain the ClassDef and ClassImp macros in their source code. It takes care of things like streamers, schema evolution and integration with ROOT. A good example is the Event class in the $ROOTSYS/test directory. I guess reflex has become stricter in the newer releases.

To fix this error, add ClassDef(edm::Event, 1) to your Event and EventHeader classes inside a private section of their definitions. When you change a class, don't forget to increment its integer.

Also add ClassImp( edm::Event ) to their implementation files. If you define the class methods in the same file as the class, add ClassImp outside and after a class' definition.

> class edm::EventHandle
> class edm::EventHeader
> class edm::Event
> Running merge_rootmap EventDataModelGen
> #CMT---> (constituents.make) EventDataModelGen done
> #CMT---> (constituents.make) Building EventDataModelDict.make
> #CMT---> Info: Library EventDataModelDict
> #CMT---> (constituents.make) Starting EventDataModelDict
> #CMT---> (EventDataModelDict.make) Rebuilding ../x86_64-sl5-gcc41-dbg/EventDataModelDict_dependencies.make
> #CMT---> compiling ../x86_64-sl5-gcc41-dbg/dict/EventDataModel/dict_dict.cpp
> #CMT---> building static library ../x86_64-sl5-gcc41-dbg/libEventDataModelDict.a
> #CMT---> building shared library ../x86_64-sl5-gcc41-dbg/libEventDataModelDict.so
> #CMT---> EventDataModelDict : library ok
> #CMT---> EventDataModelDict ok
> .............snipped.........

Greetz, Roel Received on Thu Nov 12 2009 - 08:24:30 CET

This archive was generated by hypermail 2.2.0 : Thu Nov 12 2009 - 11:50:04 CET