Hello guys, I am here asking a question about how python and ROOT are linked.
In root cli, we can load one library easily(Contains TObject class).
Then we can use those self defined class, which inherit from TObject.
gSystem->Load(“mydir/mylib.so”);
While in PyROOT, we can import root class with ROOT.gPad, ROOT.TH1F, etc.
import ROOT
However, how can I load those self defined libraries, for later we can use the same way as ROOT.myclass.
I tried
ROOT.gROOT.Macro( os.path.expanduser( ‘~/rootlogon.C’ ) );
within rootlogon.C,
gSystem->Load(“mydir/mylib.so”);
The mylib truely loaded from the printed information, however, I have no way to call it in python.
I think my question can be answered if someone can share some knowledge on how these 2 libs are generated.
libROOTTPython.so
libROOTPythonizations3_6.so
Thanks.
_ROOT Version:6.22
_Platform:centos7
_Compiler:gcc 9