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

Change an argument for converting the parameters to be std::optional #102

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jmcarcell
Copy link
Member

so that a Frame may be passed or not. This is needed to use IOSvc with the Marlin wrapper, because in that case there is not a frame that is passed around like with the PodioDataSvc.

BEGINRELEASENOTES

  • Change an argument for converting the parameters to be std::optional so that a Frame may be passed or not.

ENDRELEASENOTES

There are multiple ways of solving this but given that the convertObjectParameters function is only used in the wrapper I think this is the simplest one even if it changes the interface.

Comment on lines +17 to +25
// When using the PodioDataSvc there is always access to the event frame
// but when using IOSvc there is not a frame
auto putParamFun = [&](const std::string& key, const auto& value) {
if (event) {
event->get().putParameter(key, value);
} else {
k4FWCore::putParameter(key, value);
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make this a template parameter to the convertObjecParameters? Then we could externalize the k4FWCore dependency and simply define this in the wrapper, where we already have that dependency. I suppose the main issue is that it would need to be a templated function because it has to work for several datatypes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants