cms-nanoAOD / correctionlib

A generic correction library
https://cms-nanoaod.github.io/correctionlib/
BSD 3-Clause "New" or "Revised" License
16 stars 22 forks source link

C++ interface for providing columns by name #166

Open alexander-held opened 1 year ago

alexander-held commented 1 year ago

Similarly to the possibility to hand over dictionaries that specify column names in the Python API, it would be useful to have support for maps or a compile-time solution that allows doing this in C++. This helps mitigate issues where columns are handed over in the wrong order.

nsmith- commented 1 year ago

A partial implementation was discussed also in https://github.com/cms-nanoAOD/correctionlib/issues/8#issuecomment-768395908

nsmith- commented 1 year ago

Somewhat surprising, the python highlevel correction does not accept keyword arguments, even though it would be a trivial addition: https://github.com/cms-nanoAOD/correctionlib/blob/35039dbeeebe6f0731610d0abd82050e6a35fd25/src/correctionlib/highlevel.py#L88-L90

eguiraud commented 1 year ago

Similarly to the possibility to hand over dictionaries that specify column names in the Python API

That's not a thing, right? As per Nick's message above