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

Geometry/GEMGeometryBuilder/src/GEMGeometryBuilderFromDDD.cc const-cast fix #25913

Merged
merged 3 commits into from Feb 19, 2019

Conversation

watson-ij
Copy link
Contributor

This PR is to fix a static analyzer error in the code above. The code was using a const_cast when building the GEM geometry. By storing the superchambers in a vector, we avoid the need to call the superchambers() function and therefore avoid the const cast.

@jshlee

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25913/8390

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @watson-ij (Ian J. Watson) for master.

It involves the following packages:

Geometry/GEMGeometryBuilder

@civanch, @Dr15Jones, @cvuosalo, @ianna, @kpedro88, @cmsbuild, @mdhildreth can you please review it and eventually sign? Thanks.
@dildick 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

@kpedro88
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 12, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33090/console Started: 2019/02/12 14:29

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@@ -66,6 +67,7 @@ GEMGeometryBuilderFromDDD::build( GEMGeometry& theGeometry,
if (detIdCh.layer() == 1){// only make superChambers when doing layer 1
GEMSuperChamber *gemSuperChamber = buildSuperChamber(fv, detIdCh);
theGeometry.add(gemSuperChamber);
superChambers.push_back(gemSuperChamber);
Copy link
Contributor

Choose a reason for hiding this comment

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

It's a big dodgy to keep a list of writeable pointers after adding the super chambers to theGeometry. This technique works now, but future developers of the GEMGeometry class might assume that the GemSuperChamber objects stored in GEMGeometry cannot change since there is no interface that allows modification.
Perhaps the super chambers shouldn't be added to the GEMGeometry until after they are complete, but such an approach might have some side effects caused by changing the order of the objects stored in the GEMGeometry object.
Or a new method could be added to GEMGeometry:
const std::vector<GEMSuperChamber*>& GEMGeometry::superChambersWriteable();
to clearly allow writing to super chambers after they have been added.
This PR can go in as-is, but it would be good to consider whether this special pointer list is really the best approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, that's a good point. If we move this to after adding to the ring, we can avoid changing the superchambers after adding to theGeometry. I think the ordering should only make a difference in the GEMRing, but this isn't affected by this change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Adding the super chambers to theGeometry after they are modifed makes more sense. As long as there is no side effect from changing the order that the eta parts, GEM chambers, and super chambers are added, this approach is better.

@cvuosalo
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25913/8407

  • This PR adds an extra 16KB to repository

@cmsbuild
Copy link
Contributor

Pull request #25913 was updated. @civanch, @Dr15Jones, @cvuosalo, @ianna, @kpedro88, @cmsbuild, @mdhildreth can you please check and sign again.

@kpedro88
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 13, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33104/console Started: 2019/02/13 14:18

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 3 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@cvuosalo
Copy link
Contributor

The comparison test found 3 differences with the recent change. Are they due to this PR?

@kpedro88
Copy link
Contributor

+upgrade

@kpedro88
Copy link
Contributor

@cvuosalo the differences are in logErrorHarvester from a PU workflow, this is usually spurious

@cvuosalo
Copy link
Contributor

+1

@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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b3f42dd into cms-sw:master Feb 19, 2019
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

6 participants