I am trying enable reflection for a class I am developing named
Espresso::RooGLMFunction. Its member objects include
... std::unique_ptr<Espresso::GLMCalibrationFunction> m_calfun; ...
The problem entry appears to be m_calfun, a smart pointer to another of my classes (whose details I can provide if necessary). I enabled reflection for this class and all member classes from my library with standard options (i.e. not adding any lines in XML customizing the separate fields). On face value, this seems to work. In particular, a
RooGLMFunction object can be saved in a
RooWorkspace without any errors or warnings. However, when I attempt to load the workspace, I get this error:
root  ws_GEN->Print("v") Warning in <TStreamerInfo::BuildOld>: Cannot convert Espresso::RooGLMFunction::m_calfun from type: Espresso::GLMCalibrationFunction to type: Espresso::GLMCalibrationFunction, skip element
Espresso::GLMCalibrationFunction are the same type, and no conversion is necessary, so I suspect that the error message isn’t telling the whole story. Is there an issue due to the fact that this member object is a unique_ptr? (In my copy constructor for
RooGLMFunction, m_calfun is cloned properly).