Try to add a class. After using rootcling, what should I do next?

Following the user-guide, I write TNum.h, TNum.cxx, LinkDef.h
and using

rootcling -f TNum_dict.cxx TNum.h TNum.cxx LinkDef.h

now I have LinkDef.h TNum.cxx TNum_dict.cxx TNum_dict_rdict.pcm TNum.h

so what should I do next to using TNum in root?



rootcling -f TNum_dict.cxx -rml -rmf libTNum.rootmap TNum.h TNum.cxx LinkDef.h
g++ -fPIC -shared -o `root-config --cflags --libs` TNum.cxx TNum_dict.cxx

use, e.g. at the root prompt:

root[0] TNum a;

Note that if you don’t need to do I/O with this class, if you make it inline, i.e. defined only in the header, you can simply include the heder at the prompt/in macros in order to use it.


Thank you!
Best wishes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.