gundam-organization / gundam

GUNDAM, for Generalized and Unified Neutrino Data Analysis Methods, is a suite of applications which aims at performing various statistical analysis with different purposes and setups.
GNU Lesser General Public License v2.1
13 stars 11 forks source link

Python interface for the propagator engine #428

Open nadrino opened 11 months ago

nadrino commented 11 months ago

As many people use Python nowadays, having a python module that would load the GUNDAM engine within its core.

A possible implementation would be: https://www.matecdev.com/posts/cpp-call-from-python.html

Such a tool might be developped in an experimental branch of GUNDAM

ClarkMcGrew commented 11 months ago

A good option would be to "declare" the gundam classes to ROOT since that will make the classes available to python. It probably requires refactoring some of the top level classes though.

nadrino commented 11 months ago

I guess this would mean inheritance addition to each GUNDAM class right? This I would like NOT to do 😅

ClarkMcGrew commented 11 months ago

As far as I know, that hasn't been necessary for a long time. The class needs to be "in a shared library" and you need to build a dictionary (also part of the shared library), but there are basically no changes needed for the class. Using the class for I/O requires a little more finess, and a bare class won't show up in the browser (AFAIK), but it should be usable from python (and ROOT macro files).