RE: [ROOT] TObject inheritance and assignment operator

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Apr 05 2004 - 22:06:47 MEST


Hi John,

This a known hard limititation of CINT.  Currently the behavior
of interpreted classes inheriting from compiled classes is incorrect
in many ways (hence the warning that you can sometime see).

Namely CINT does not know how to modify the virtual table to 
take in account the interpreted part.  Hence as far as any
compiled code is concerned, your object is limited to the compiled
part.  It is likely that the 'default assignment operator' will not
work. (I suppose it could but ...)

If you need to use such construct, please use ACLiC to compile
your code.

Cheers,
Philippe

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of John Pretz
Sent: Monday, April 05, 2004 11:14 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] TObject inheritance and assignment operator


Howdy ROOTTALK!

I'm encountering a funny bug with Root and assignment operators.

I try to use the default assignment operator that the compiler generates 
and it works _if_ the object _doesn't_ inherit from TObject.  When I use 
operator= with an object that _does_ inherit from TObject, the data in the
'copied-to' object is zero.

This is a problem just in the interpreter.  Compiled code works fine.

Please seen the attached tarball.  'make' will compile the code and run 
the examples.  

I'm using ROOT 3.10.02 on a RedHat 9 machine.

Thanks for looking!

John



-- 
---------------Visit my webpage!---------------------
---------http://umdgrb.umd.edu/pretz-----------------


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET