Skip to content

I get the error Error in TClass::New: cannot create object of class MyNewClass when trying to use my own Action

dglazier edited this page May 13, 2020 · 1 revision

For ROOT to write an object to a root file it needs a efulat constructor for the streamer function.

That is if you are making your own class MyClass the constructor

MyClass() = default;

Must be declared in the header class definition. Older C++ may have written this as

MyClass(){};