I have a simple question .
We have written a class inherithin from RooNLLVar
class AdaptiveNLL : public RooNLLVar{
In the LinkDef.h file we use we have
#pragma link C++ class AdaptiveNLL+;
When we compile we get
Warning: Unused class rule: AdaptiveNLL
Are we doing something wrong with LinkDef with inheritances ?
THe same kind of code is working when we write a class inherithing from TObject and we write the ClassDef, and ClassImp stuff inside our classes. I wonder if there ClassDef/Imp is special for TObject based classes or it can be expanded also in RooFit world.
Thanks
Renato
For the records, i added the ClassDef and ClassImp around, the messages disappear but it seems like i must reimplement something related to the TBuffer and streaming to disk of this class.
I guess that inside RooFit, any extension of RooRealVar , or other classes should have some extra method to be written down for persistency, things you don’t need for inherithed classes from TObject. Is that correct?
Hi @RENATO_QUAGLIANI,
Can you confirm you have includeed a default constructor to your class? ROOT I/O requires it. For RooFit specifics, I believe @StephanH can help you out.
Cheers,
Vincenzo