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

Make interfaces of C++ correction types more uniform #215

Closed eguiraud closed 1 year ago

eguiraud commented 1 year ago

Before this commit, most correction types implemented an evaluate method while some implemented a child method. When walking a correction's compute graph, the node_evaluate visitor had to know which ones required recursive visiting and which did not.

With this patch, all correction types implement evaluate. This simplifies the implementation of the node_evaluate visitor considerably and keeps the logic related to the handling of each type of correction local to the corrections themselves.

@nsmith- just an idea, feel free to close if you don't like the direction.

eguiraud commented 1 year ago

can merge? :grimacing: