-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Migrate from boost::optional to std::optional in EventSetup system #24586
Conversation
Includes whitespace changes due to using nested namespace declarations, which are supported as of C++17.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-24586/6472 |
A new Pull Request was created by @knoepfel (Kyle Knoepfel) for master. It involves the following packages: DQM/DTMonitorClient @smuzaffar, @andrius-k, @Dr15Jones, @kmaeshima, @schneiml, @monttj, @nsmith-, @rekovic, @cmsbuild, @jfernan2, @thomreis, @gpetruc, @arizzi can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
please test |
The tests are being triggered in jenkins. |
@@ -11,7 +11,7 @@ void DQMDaqInfo::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, con | |||
|
|||
edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd")); | |||
|
|||
if( nullptr != iSetup.find( recordKey ) ) { | |||
if( std::nullopt != iSetup.find( recordKey ) ) { |
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.
Should this also be changed to use tryToGet
?
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.
Yes...I missed that one. Will change.
FWCore/Framework/src/ESProducer.cc
Outdated
@@ -2,7 +2,7 @@ | |||
// | |||
// Package: Framework | |||
// Class : ESProducer | |||
// | |||
// |
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.
It looks like you only changed spaces here? Can this be reverted back?
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.
Yikes, yes that's true. Will revert.
ToT & iTo) { | ||
iTo = std::move(iFrom); | ||
} | ||
namespace edm::eventsetup { |
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.
Was this just a change from 3 spaces to 2 ? If so, please revert.
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.
Namespace collapsing was the change.
|
||
struct Label { | ||
Label() = default; | ||
Label(std::string_view const iString) : default_{iString} {} |
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.
Was string_view
the only change?
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.
That and the namespace collapsing.
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.
I think the switch to std::string_view is causing the compilation problem in HcalHardcodeGeometryEP.
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.
Yes, just confirmed that. Will revert.
@@ -4,7 +4,7 @@ | |||
// | |||
// Package: Framework | |||
// Class : DummyProvider | |||
// | |||
// |
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.
Were only cosmetic changes done to this file?
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.
Yes
}; | ||
} | ||
} | ||
namespace edm::eventsetup::test { |
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.
Is this only cosmetic changes?
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.
Yes
@@ -28,114 +28,113 @@ | |||
|
|||
// forward declarations | |||
namespace edm { |
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.
Are the only changes the spacing and the collapsed namespace? If so, please revert.
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.
Yes, will revert.
@@ -4,7 +4,7 @@ | |||
// | |||
// Package: Framework | |||
// Class : ESProducer | |||
// |
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.
Were there any functional changes to this file?
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.
I think the answer is no. I'll be more careful next time.
@@ -63,7 +63,7 @@ void L1RCTChannelMaskTester::analyze(const edm::Event& iEvent, | |||
edm::eventsetup::EventSetupRecordKey::TypeTag::findType( | |||
"L1RCTNoisyChannelMaskRcd")); | |||
|
|||
if (evSetup.find(recordKey) == nullptr) { | |||
if (evSetup.find(recordKey) == std::nullopt) { | |||
//record not found |
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.
Missed this one, too--should be tryToGet
.
The code-checks are being triggered in jenkins. |
Pull request #24586 was updated. @smuzaffar, @andrius-k, @Dr15Jones, @kmaeshima, @schneiml, @monttj, @nsmith-, @rekovic, @cmsbuild, @jfernan2, @thomreis, @ggovi, @gpetruc, @arizzi can you please check and sign again. |
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
+1 |
+1 |
+1 |
+1 |
merge |
This PR does include some whitespace changes which are due to using C++17's nested namespace declarations.