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

Moving esConsumes statement from the analyze method into the constructor #37650

Merged
merged 3 commits into from
Apr 22, 2022

Conversation

igv4321
Copy link
Contributor

@igv4321 igv4321 commented Apr 21, 2022

PR description:

Moving esConsumes statement from the "analyze" method into the constructor.

PR validation:

Checked that the database read/write sequence for HFPhase1PMTParams objects works as described in CondTools/Hcal/test/readme_HFPhase1PMTParams.txt

This code is not used by any workflows (calibration tables preparation only), so default matrix tests were not run.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37650/29448

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @igv4321 (Igor Volobouev) for master.

It involves the following packages:

  • CondTools/Hcal (db)

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

@@ -51,16 +51,16 @@ class BoostIODBReader : public edm::one::EDAnalyzer<> {
void analyze(const edm::Event&, const edm::EventSetup&) override;

std::string outputFile_;
edm::ESGetToken<DataType, RecordType> tok_;
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
edm::ESGetToken<DataType, RecordType> tok_;
const edm::ESGetToken<DataType, RecordType> tok_;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, changed as suggested.

@tvami
Copy link
Contributor

tvami commented Apr 21, 2022

Hi @igv4321 thanks for doing this change!
I believe cmsRun HFPhase1PMTParamsDBWriter_cfg.py and the corresponding readers could easily be made into a unit test, and I think we should do it. Have you done a unit test for CMSSW before? Should I point you to some example? Thanks.

@igv4321
Copy link
Contributor Author

igv4321 commented Apr 21, 2022

@tvami I don't remember writing unit tests... Yes, please point out some example.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37650/29449

  • This PR adds an extra 12KB to repository

@cmsbuild
Copy link
Contributor

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

@tvami
Copy link
Contributor

tvami commented Apr 21, 2022

@igv4321
here is an example, the BuildFile
https://github.com/cms-sw/cmssw/blob/master/CondTools/SiPixel/test/BuildFile.xml

launches the test createTestDBObjects.sh
which then does the cmsRun

https://github.com/cms-sw/cmssw/blob/master/CondTools/SiPixel/test/createTestDBObjects.sh#L7-L8

And then a next line could read the sqlite file being created by the HFPhase1PMTParamsDBWriter_cfg

@igv4321
Copy link
Contributor Author

igv4321 commented Apr 21, 2022

@tvami Ok, thanks. Unit test added.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-37650/29450

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

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

@tvami
Copy link
Contributor

tvami commented Apr 21, 2022

@cmsbuild , please test

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d93e44/24117/summary.html
COMMIT: 7ac6e39
CMSSW: CMSSW_12_4_X_2022-04-21-1100/slc7_amd64_gcc10
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/37650/24117/install.sh to create a dev area with all the needed externals and cmssw changes.

Comparison Summary

@slava77 comparisons for the following workflows were not done due to missing matrix map:

  • /data/cmsbld/jenkins/workspace/compare-root-files-short-matrix/data/PR-d93e44/39434.75_TTbar_14TeV+2026D88_HLT75e33+TTbar_14TeV_TuneCP5_GenSimHLBeamSpot14+DigiTrigger+RecoGlobal+HLT75e33+HARVESTGlobal

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 49
  • DQMHistoTests: Total histograms compared: 3695434
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 3695404
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 48 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 205 log files, 45 edm output root files, 49 DQM output files
  • TriggerResults: no differences found

@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 966f784 into cms-sw:master Apr 22, 2022
@qliphy
Copy link
Contributor

qliphy commented Apr 23, 2022

@igv4321 there is a unit test failure in IB after this PR gets merged. Please have a check and fix it:

https://cmssdt.cern.ch/SDT/cgi-bin/logreader/slc7_amd64_gcc10/CMSSW_12_4_X_2022-04-22-2300/unitTestLogs/CondTools/Hcal#/19-19
ata/cmsbld/jenkins/workspace/ib-run-qa/CMSSW_12_4_X_2022-04-22-2300/src/CondTools/Hcal/test/testHFPhase1PMTParams.sh: line 6: /data/cmsbld/jenkins/workspace/ib-run-qa/CMSSW_12_4_X_2022-04-22-2300/test/slc7_amd64_gcc10/write_HFPhase1PMTParams: No such file or directory
Failure running write_HFPhase1PMTParams: status 127
status = 32512

---> test HFPhase1PMTParams_unittest had ERRORS
TestTime:1
^^^^ End Test HFPhase1PMTParams_unittest ^^^^

@igv4321
Copy link
Contributor Author

igv4321 commented Apr 23, 2022

I can't reproduce it, but looking at the log file, this problem could be due to an out-of-order execution of tests in the production environment. @tvami Is there some way to ensure that the <bin file="write_HFPhase1PMTParams.cc"> branch of CondTools/Hcal/test/BuildFile.xml (which actually builds the "write_HFPhase1PMTParams" executable) is completed before the <bin file="HFPhase1PMTParams_unittest.cc"> branch is run?

@mmusich
Copy link
Contributor

mmusich commented Apr 23, 2022

Is there some way to ensure that the branch of CondTools/Hcal/test/BuildFile.xml (which actually builds the "write_HFPhase1PMTParams" executable) is completed before the branch is run?

The flag PRE_TEST should do the trick:

e.g.:

<flags PRE_TEST="testAlignmentOfflineValidation"/>

@igv4321
Copy link
Contributor Author

igv4321 commented Apr 23, 2022

OK, thanks. The fix is provided in the PR #37666

@tvami
Copy link
Contributor

tvami commented Apr 23, 2022

Thanks @igv4321 for the fix.
@qliphy why didnt the unit test in here https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-d93e44/24117/unitTests/src/CondTools/Hcal/test/HFPhase1PMTParams_unittest/testing.log catch this? Should I test the bugfix PR differently? (for example with the full CMSSW setup?)

@smuzaffar
Copy link
Contributor

@tvami , for PR tests and local tests ${CMSSW_BASE}/test/${SCRAM_ARCH}/write_HFPhase1PMTParams exists but for IB tests it does not. For IB tests, we just create a cmssw dev area and all the tests executables are in $CMSSW_RELEASE_BASE. As for unit tests the test/arch directories are in PATH so just run write_HFPhase1PMTParams

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