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

Fix LogDebug in HLTrigger/Muon package #25580

Merged
merged 4 commits into from
Jan 7, 2019

Conversation

Dr15Jones
Copy link
Contributor

@Dr15Jones Dr15Jones commented Jan 3, 2019

The clang static analyzer appears to be using the compilation option EDM_ML_DEBUG as true. This forces actually compiling LogDebug which was failing for this package.

The constructor of HLTMuonIsoFilter would not compile using clang's
standard C++ library implementation. This fixes that problem and
makes a few improvements.
- Call LogDebug::log to only do work if logging is on
  this avoids the compilation problem by not trying to use '<<'
  on an std::ostringstream
- Converted to range based for loop
- Preallocate space in std::vector
- Avoid unnecessary resetting of member variable
@Dr15Jones
Copy link
Contributor Author

This fixes errors found when we run the clang static analyzer.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

A new Pull Request was created by @Dr15Jones (Chris Jones) for master.

It involves the following packages:

HLTrigger/Muon

@Martin-Grunewald, @cmsbuild, @fwyzard can you please review it and eventually sign? Thanks.
@battibass, @abbiendi, @jhgoh, @Martin-Grunewald, @calderona, @HuguesBrun, @trocino, @folguera this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@Dr15Jones
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32401/console Started: 2019/01/03 20:30

@Dr15Jones
Copy link
Contributor Author

It is not that the clang C++ standard library is different. What is happening is the static analyzer is testing using 'EDM_ML_DEBUG' to true and the LogDebug message was not compileable.

There is no standard operator<< for std::vector.
The code will now compile with EDM_ML_DEBUG compiler flag.
-Switch to LogDebug::log call and fix compilation problem when using
 EDM_ML_DEBUG
-Call std::vector::reserve
-Switch to using range based for
@Dr15Jones Dr15Jones changed the title Improved HLTMuonIsoFilter constructor Fix LogDebug in HLTrigger/Muon package Jan 3, 2019
@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2019

Pull request #25580 was updated. @Martin-Grunewald, @cmsbuild, @fwyzard can you please check and sign again.

@Martin-Grunewald
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32408/console Started: 2019/01/04 06:43

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2019

Comparison job queued.

@Martin-Grunewald
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2019

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)

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 4, 2019

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-25580/32408/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 2 differences found in the comparisons
  • DQMHistoTests: Total files compared: 33
  • DQMHistoTests: Total histograms compared: 3153717
  • DQMHistoTests: Total failures: 13
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3153500
  • DQMHistoTests: Total skipped: 204
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 32 files compared)
  • Checked 137 log files, 14 edm output root files, 33 DQM output files

@fabiocos
Copy link
Contributor

fabiocos commented Jan 7, 2019

+1

@cmsbuild cmsbuild merged commit 6338908 into cms-sw:master Jan 7, 2019
@Dr15Jones Dr15Jones deleted the clangHLTMuonIsoFilter branch January 11, 2019 14:54
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