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
Use unique_ptr, not auto_ptr in RecoEgamma and RecoEcal #15857
Use unique_ptr, not auto_ptr in RecoEgamma and RecoEcal #15857
Conversation
A new Pull Request was created by @wmtan for CMSSW_8_1_X. It involves the following packages: RecoEcal/EgammaClusterAlgos @perrotta, @cmsbuild, @silviodonato, @cvuosalo, @fwyzard, @Martin-Grunewald, @slava77, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
@cmsbuild please test |
The tests are being triggered in jenkins. |
+1 |
I have a related question, though it goes beyond the scope of this PR. I see that in many modules, a Does this actually incur in an additional copy ? |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar |
+1 |
In preparation for removing framework support for deprecated auto_ptr arguments in put() calls, this pull request replaces the use of auto_ptr with unique_ptr in RecoEgamma and RecoEcal packages. Also, std::make_unique is used when appropriate. Also, there was a case where a reference to an auto_ptr was an input argument to a function, which is a bad practice because it obscures the possible transfer of ownership. In the cases here, ownership was transferred, so the unique_ptr was passed by value.