forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I had a class containing a pointer to one of our classes and had to turn this pointer into a pointer to one of its base-class, eg:
Old: class A { TNamed *a; }
New: class A { TObject *a; }{code}
Now I get the following message reading a root file in which I stored an object of the old class with the new class in the dictionary:
Warning in <TStreamerInfo:BuildOld>: Cannot convert A::a from type:TNamed* to type TObject, skip element.
It should be easy to detect that TObject is a base class of TNamed (and both are in the dictionary) so reading the object and setting the pointer correctly should not be very difficult. And would allow simple changes to your classes without loosing compatibility.