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 the return type of ESProducer templates L1ConfigOnlineProdBase… #22146
Change the return type of ESProducer templates L1ConfigOnlineProdBase… #22146
Conversation
… and L1ObjectKeysOnlineProdBase to std::unique_ptr
Don't test yet. For review only. |
The code-checks are being triggered in jenkins. |
@Dr15Jones please review. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22146/3276 |
A new Pull Request was created by @gartung (Patrick Gartung) for master. It involves the following packages: CondTools/L1Trigger @ggovi, @nsmith-, @cmsbuild, @thomreis, @rekovic can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
@@ -161,7 +161,7 @@ L1ConfigOnlineProdBase<TRcd, TData>::produce( const TRcd& iRecord ) | |||
if( !payloadToken.empty() ) | |||
{ | |||
m_dbSession.transaction().start() ; | |||
pData = m_dbSession.fetchPayload<TData>( payloadToken ) ; | |||
pData = std::make_unique<TData>(*(m_dbSession.fetchPayload<TData>( payloadToken ).get())) ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Dr15Jones fetchPayload returns a shared_ptr. Here I make a copy of the object and create a unique_ptr for return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I think it would be better to just keep return a std::shared_ptr
.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22146/3284 |
@@ -24,7 +24,7 @@ L1MuCSCPtLutConfigOnlineProd::newObject( const std::string& objectKey ) | |||
{ | |||
edm::LogError( "L1-O2O" ) << "Problem with L1MuCSCPtLutParameters key" ; | |||
// return empty object | |||
return std::shared_ptr< L1MuCSCPtLut >() ; | |||
return std::make_shared< L1MuCSCPtLut >() ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are different. The original created an empty shared_ptr
. Your code makes a shared_ptr
containing a defaultly constructed object.
Please set the code back to what it was.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-22146/3287 |
Comparison job queued. |
Comparison is ready @slava77 comparisons for the following workflows were not done due to missing matrix map:
Comparison Summary:
|
+1 |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
… and L1ObjectKeysOnlineProdBase to std::unique_ptr