Problem implementing an abstract class in ROOT


I have seen there was a similar topic at this address,
[url]Mysterious Warning: no public constructor
this was long time ago, so I am not sure if it applies to my case.

Here is my problem

I have a base class, named TRestRun, and a derived class named TRestG4Run

TRestRun derives at the same time of TRestMetadata::TObject

This works fine, I can create the ROOT dictionary and load my library in ROOT without problems. Everything works fine.

However, when I want to make TRestRun an abstract class, by re-definning an existing method into a pure virtual method I get the following warning when calling the destructor of TRestRun (using “delete restG4Run;”)

Warning in <TKey::TKey>: since TRestRun has no public constructor which can be called without argument, objects of this class can not be read with the current library. You will need to add a default constructor before attempting to read it.

The method defined in TRestRun (abstract class) is

and in the derived class (where the method is implemented) it is

My ROOT version is 5.34

Do you have any suggestion to resolve this problem?



can you provide the smallest code reproducing the problem?
The first thing to figure out is why a TKey is created in the object destructor.