ROOTPWA-Maintainers / ROOTPWA

ROOTPWA is a toolkit for partial-wave analysis of multi-particle final states produced in high-energy particle reactions. It is used to determine hadron spectra from experimental data.
Other
8 stars 14 forks source link

pyInterface: Implement Python converter for multibinBoundariesType #225

Closed stefan-wallner closed 7 years ago

stefan-wallner commented 7 years ago

Implement a converter functions between Python and C++ for the multibinBoundariesType. Replace the multiple implementations of this conversion by the common converter functions.

suhlatwork commented 7 years ago

Please check branch. By adding the converters to the Boost.Python interface we would no longer need to take care to call the proper functions on the C++ side, but could simply write the type we want.

stefan-wallner commented 7 years ago

I agree that this is a very elegant way. However, with your proposal we introduce a general converter from map<string, pair<double,double>> to a python dictionary of (string, tuple), not just for the special case of a binning map. I'm not sure whether this is a good idea. Alternatively, we could implement your proposal and define 'multibinBoundariesType' as class, not just a typedef.

suhlatwork commented 7 years ago

Merged, thank you!