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

[RFC] Replace ParameterSet::existAs with ParameterSet::get*Parameter<std::optional<...>> #46061

Open
Dr15Jones opened this issue Sep 19, 2024 · 4 comments

Comments

@Dr15Jones
Copy link
Contributor

We could use edm::ParameterSet::get*Parameter<std::optional<>> as a replacement for existsAs. The idea would be the fillDescriptions would add something special internal to the edm::ParameterSet for an optional that does not contain a default. Then only if that optional was declared in the fillDescriptions does the edm::ParameterSet::get*Parameter<std::optional<>> not throw if called. This fixes a problem with existsAs if one happens to have a typo using the wrong class type or wrong parameter name.

@Dr15Jones
Copy link
Contributor Author

assign core

@cmsbuild
Copy link
Contributor

New categories assigned: core

@Dr15Jones,@makortel,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks

@Dr15Jones Dr15Jones changed the title Replace ParameterSet::existAs with ParameterSet::get*Parameter<std::optional<...>> [RFC] Replace ParameterSet::existAs with ParameterSet::get*Parameter<std::optional<...>> Sep 19, 2024
@cmsbuild
Copy link
Contributor

cms-bot internal usage

@cmsbuild
Copy link
Contributor

A new Issue was created by @Dr15Jones.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

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

No branches or pull requests

2 participants