To make available some useful function in CINT (C++ interpreter of ROOT), I configured my rootrc
config file to execute a rootlogon.C
file each time I run root
to launch the interpreter.
In rootlogon.C
, this piece of code is present:
{
gROOT->ProcessLine("#include \"GenericToolbox.h\"");
}
This line is kind of working as intented since I'm then able to access most of the defined function in the header file. However the functions involving template can't be accessed. I understand that because this is a header-only library, the interpreter can't predict which object types will be used as template definition.
So do you know if I could make a kind of shared library that could be loaded in the rootlogon, which would define specific template functions?
I've seen some examples suggesting to utilize a LinkDef.h
file which contains #pragma link C++ function
lines to specialize templates, but I don't understand how to use it...
Any idea?