RooWorkspace::ImportClassCode()

Hi!

Is there a way to import the code that is #include’ed in the class code implementation? I have a custom RooAbsPdf implemented in MyPdf.cxx and MyPdf.h, I add an object of its type to a workspace, do ImportClassCode and save to a file, and all is well, MyPdf code is imported. But there is an include in MyPdf.cxx

#include “some_helper_functions.h”

and the code in some_helper_functions.h is not imported, I have to carry this file together with the workspace. Is there a way to import it?

Thanks,
Gena

Hi,

The logic that is supported for importClassCode() is intentionally somewhat limited
as it is very difficult to support the most general use case. What is presently assumed/supported is

  • Every class can have one declaration and one implementation file (with the same basename)

  • Multiple classes can share an one pair of implementation/declaration files

In your case you would need to manually include your helper function into the class file. I might
extend this in the future a bit.

Wouter