Dear experts,
I have a compiled C++ class with a member enum which I want to use within PyROOT. It look like
class foo{
public:
enum bar{id1=1, id2, id3}
double myFunc(const bar& id);
}
Now I want to call myFunc by:
gSystem.Load(‘libfoo’)
obj = foo()
obj.myFunc(obj.id1)
This unfortunately doesn’t work, but I need to cast my enum to ROOT.Long. In principle this is working, but I was wondering if there is any work around to prevent the cast, since this function call may be executed quite often at different places. Further if I want to pass an integer I would need to cast it as well.
Many thanks in advance!
Cheers,
Marcus