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

Modernize analyzers in CondFormats/RPCObjects/test #36148

Merged
merged 3 commits into from Nov 17, 2021

Conversation

mrodozov
Copy link
Contributor

PR description:

This moves analyzers in tests to esConsumes and uses one/EDAnalyzer as suggested in the
CMSSW_12_2_CMSDEPRECATED_X_2021 IB
Removes a dummy destructor

PR validation:

Tests ran, compiles without warnings

if this PR is a backport please specify the original PR and why you need to backport that PR:

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36148/26688

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mrodozov (Mircho Rodozov) for master.

It involves the following packages:

  • CondFormats/RPCObjects (db, alca)

@malbouis, @yuanchao, @cmsbuild, @ggovi, @francescobrivio, @tvami can you please review it and eventually sign? Thanks.
@mmusich, @tocheng, @seemasharmafnal this is something you requested to watch as well.
@perrotta, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

Comment on lines 45 to 46
edm::ESHandle<RPCEMap> readoutMapping = iSetup.getHandle(readoutMappingToken_);
map = readoutMapping.product()->convert();
Copy link
Contributor

@tvami tvami Nov 17, 2021

Choose a reason for hiding this comment

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

the Handle is not used for anything so this could be make concise like

Suggested change
edm::ESHandle<RPCEMap> readoutMapping = iSetup.getHandle(readoutMappingToken_);
map = readoutMapping.product()->convert();
const auto map = &iSetup.getData(readoutMappingToken_)->convert();

although I'm not really sure what the convert() is doing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed the redundant vars but I'm not sure how to switch to getData instead of getHandle

Copy link
Contributor

Choose a reason for hiding this comment

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

I gave an explicit suggestion here
#36148 (comment)
HTH

} else {
edm::ESHandle<RPCReadOutMapping> map0;
iSetup.get<RPCReadOutMappingRcd>().get(map0);
edm::ESHandle<RPCReadOutMapping> map0 = iSetup.getHandle(mapZeroToken_);
map = map0.product();
Copy link
Contributor

Choose a reason for hiding this comment

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

This def can be

Suggested change
map = map0.product();
const auto map = &iSetup.getData(mapZeroToken_);

@mrodozov mrodozov force-pushed the remove-deprecated-uses-RPCObjects branch from 9ae8047 to c94b375 Compare November 17, 2021 00:46
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36148/26690

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36148 was updated. @malbouis, @yuanchao, @cmsbuild, @ggovi, @francescobrivio, @tvami can you please check and sign again.

edm::ESHandle<RPCReadOutMapping> map0;
iSetup.get<RPCReadOutMappingRcd>().get(map0);
map = map0.product();
map = iSetup.getHandle(mapZeroToken_).product();
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @mrodozov this is a bit different from what I suggested. What suggested had the getData() function.
getData() is like the getHandle and the .product() together

I also suggested to make it const (and to use auto)

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
map = iSetup.getHandle(mapZeroToken_).product();
const auto map = &iSetup.getData(mapZeroToken_);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the map is defined outside the condition already

const RPCEMap* eMap = readoutMapping.product();
// RPCReadOutMapping* map = eMap->convert();
map = eMap->convert();
map = iSetup.getHandle(readoutMappingToken_).product()->convert();
Copy link
Contributor

Choose a reason for hiding this comment

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

same thing here with the getData

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36148/26691

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36148 was updated. @malbouis, @yuanchao, @cmsbuild, @ggovi, @francescobrivio, @tvami can you please check and sign again.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36148/26699

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #36148 was updated. @malbouis, @yuanchao, @cmsbuild, @ggovi, @francescobrivio, @tvami can you please check and sign again.

@tvami
Copy link
Contributor

tvami commented Nov 17, 2021

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-e9f774/20588/summary.html
COMMIT: 723d31d
CMSSW: CMSSW_12_2_X_2021-11-16-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36148/20588/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 42
  • DQMHistoTests: Total histograms compared: 3327156
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3327134
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 41 files compared)
  • Checked 177 log files, 37 edm output root files, 42 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Nov 17, 2021

+1

  • code change was tested locally

@cmsbuild
Copy link
Contributor

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. @perrotta, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@perrotta
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 837d2ac into cms-sw:master Nov 17, 2021
@mrodozov mrodozov deleted the remove-deprecated-uses-RPCObjects branch November 17, 2021 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants