Skip to content

I/O Schema Evolution: Automate conversion from Derived* to Base* #22

@pcanal

Description

@pcanal

See https://sft.its.cern.ch/jira/browse/ROOT-871?jql=project%20%3D%20ROOT%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20ORDER%20BY%20created%20ASC

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions