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

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

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

eguiraud
Copy link
Contributor

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.

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.
Copy link
Collaborator

@nsmith- nsmith- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine by me! Looks cleaner.

@eguiraud
Copy link
Contributor Author

eguiraud commented Nov 3, 2023

can merge? 😬

@nsmith- nsmith- merged commit 42a327e into cms-nanoAOD:master Nov 6, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants