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

ECAL : corrections in the condition tools code : ThreadSafety, Dead store #36293

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

depasse
Copy link
Contributor

@depasse depasse commented Nov 30, 2021

PR description:

ECAL : corrections in the condition tools code : dead assignment, dead initialization, non-const static variables

PR validation:

Done with success :
$ scram build code-checks
$ scram build code-format
$ scram build runtests

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

No backport

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36293/27002

  • This PR adds an extra 68KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @depasse for master.

It involves the following packages:

  • CondTools/Ecal (db)

@cmsbuild, @ggovi, @tvami, @malbouis, @francescobrivio can you please review it and eventually sign? Thanks.
@rchatter, @simonepigazzini, @mmusich, @thomreis, @argiro 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

@@ -272,6 +272,8 @@ bool popcon::EcalDCSHandler::insertHVDataSetToOffline(const std::map<EcalLogicID
ex_y[4] = 12;
ex_x[5] = 6;
ex_y[5] = 11;
} else {
std::cout << "Dee number not known !" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

This will not fix the issue about ex_x[l] containing garbage since the array is still not defined. And indeed the same is true for ex_y[l] as far as I can see even though the SA does not flag it.

Since we have only four Dees in CMS I think you could just throw an exception since clearly something is wrong in this case.

// if (lv_off_dbstatus > 0)
// lv_off_dbstatus = 1;
// if (lv_nomi_off_dbstatus > 0)
// lv_nomi_off_dbstatus = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the commented out code if it is not needed.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-36293/27025

  • This PR adds an extra 68KB to repository

@cmsbuild
Copy link
Contributor

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

@tvami
Copy link
Contributor

tvami commented Nov 30, 2021

@cmsbuild , please test

@mmusich
Copy link
Contributor

mmusich commented Nov 30, 2021

the title of this PR is extremely generic. For the benefit of the readers of the future release notes would it be possible to state explicitly this is about ECAL condition tools?

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccb5de/20873/summary.html
COMMIT: b474817
CMSSW: CMSSW_12_2_X_2021-11-29-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/36293/20873/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: 41
  • DQMHistoTests: Total histograms compared: 3042214
  • DQMHistoTests: Total failures: 0
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3042192
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 40 files compared)
  • Checked 175 log files, 37 edm output root files, 41 DQM output files
  • TriggerResults: no differences found

@tvami
Copy link
Contributor

tvami commented Nov 30, 2021

Hi @depasse yes, please change the title of the PR.
@thomreis please note that there is a legacy module used in EcalPedestalHistory.h https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-ccb5de/20873/llvm-analysis/
(not for this PR, just mentioning)

@depasse depasse changed the title Corrections in the code : ThreadSafety, Dead store ECAL : corrections in the condition tools code : ThreadSafety, Dead store Dec 1, 2021
@thomreis
Copy link
Contributor

thomreis commented Dec 1, 2021

@tvami yes the legacy module is going to be fixed in a different PR to be made shortly.

@ggovi
Copy link
Contributor

ggovi commented Dec 1, 2021

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Dec 1, 2021

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

perrotta commented Dec 1, 2021

This PR is supposed to improve Thread Safety of the code involved.
Still, I see several classes (at least EcalChannelStatusHandler, EcalErrorMask) which have a lot of cout's in them.
What are these classes intended to? If they have to be thread safe, a migration to thread safe Log messages is also in order.

@thomreis
Copy link
Contributor

thomreis commented Dec 1, 2021

This PR is to fix Static Analyzer issues. Some of those concern thread safety in the form of non-const static variables. Those should be fixed with the current changes. The modules themselves do not need to be thread safe.

@perrotta
Copy link
Contributor

perrotta commented Dec 1, 2021

+1

@cmsbuild cmsbuild merged commit cfd502d into cms-sw:master Dec 1, 2021
@depasse
Copy link
Contributor Author

depasse commented Dec 1, 2021 via email

@tvami
Copy link
Contributor

tvami commented Dec 1, 2021

@depasse if you have things done, let's not stash them, but let's open a new PR, it could be a bigger dedicated one that concentrates on the cout-s.

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.

7 participants