Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend PyRDF.initialize to "string code" and functions from imported modules #17

Open
JavierCVilla opened this issue Mar 28, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@JavierCVilla
Copy link
Collaborator

Currently PyRDF.include only supports python callable of this shape:

def f(a, b, c):
     import ROOT
     ROOT.myCppFunction(a, b, c)

PyRDF.initialize(f, a, b, c)

It would be useful to support any of the following calls:

PyRDF.initialize(ROOT.myCppFunction, a, b, c)
PyRDF.initialize("myCppFunction", a, b, c)
PyRDF.initialize(f, a, b, c) 

This way the code would be cleaner.

@vepadulano
Copy link
Owner

This could be refactored with the new PyROOT feature to wrap any python function in a C++ function pointer and execute it on the C++ side. To be seen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants