I’ve just corrected that issue. The problem was that I changed the code after posting it here. I put the functions inside UtilsFunctions into a class. Now that I changed it back to plain functions it’s working smoothly.
However, when changing everything back to functions, I’m not able to call them (functions from UtilsFunctions) from the master python script. For example, if I define a function function1
inside UtilsFunctions.h
and its source code is in UtilsFunctions.cxx
, if I try to call it from MyMasterFile.py
like
import ROOT
ROOT.gSystem.Load("libPackageName.so")
ROOT.function1()
it complains with an attribute error AttributeError: function1
. This problems doesn’t appear when I call ClassA
as
tool = ClassA()
tool.MethodFoo()
I also checked that I have this line not commented
#pragma link C++ defined_in "UtilsFunctions.h";
inside LinkDef.h
Do I need to add something when calling the function?
Thank you very much for your help! And sorry for these lots of questions
Cheers,
Francisco