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

Don't forward declare CaloTower in CaloTowerFwd.h #18805

Merged
merged 2 commits into from Jun 7, 2017

Conversation

Teemperor
Copy link
Contributor

This header won't compile with just a forward declaration of
CaloTower, because the Ref and RefVector types we declare will check the
ValueTrait of it's containing class, which is in this case CaloTower.
ValueTrait needs to have the definition of CaloTower to work, but
we only have a forward declaration in this header available.

This leads to undefined behavior, so we should replace this forward
declaration with an actual include.

People seem to anyway always include CaloTower too to
avoid this cryptic error, so I don't think this will hit compilation
times that much.

@cmsbuild cmsbuild added this to the CMSSW_9_2_X milestone May 17, 2017
@Teemperor
Copy link
Contributor Author

Part of the work going on regarding issue #15248

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @Teemperor (Raphael Isemann) for master.

It involves the following packages:

DataFormats/CaloTowers

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@davidlange6 you are the release manager for this.

cms-bot commands are listed here

@slava77
Copy link
Contributor

slava77 commented May 17, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 17, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/19939/console Started: 2017/05/17 19:25

@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-18805/19939/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6087 differences found in the comparisons
  • DQMHistoTests: Total files compared: 24
  • DQMHistoTests: Total histograms compared: 1833867
  • DQMHistoTests: Total failures: 65816
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1767871
  • DQMHistoTests: Total skipped: 180
  • DQMHistoTests: Total Missing objects: 0
  • Checked 98 log files, 14 edm output root files, 24 DQM output files

@slava77
Copy link
Contributor

slava77 commented May 18, 2017

should we instead fix the Ref or remove typedefs that can not be forward-declared from Fwd files?
It seems a bit awkward to keep *Fwd file which can not serve the purpose in its name to be a forward header.

@davidlange6 @Dr15Jones

@slava77
Copy link
Contributor

slava77 commented May 22, 2017

@davidlange6 @Dr15Jones
please let me know what is a good way to go here #18805 (comment)

@Dr15Jones
Copy link
Contributor

There is nothing to 'fix' in Ref, it is doing what it needs to do. I think the problem is the name of the file itself. The file was never used for 'forwarding', instead it defines a set of common typedefs. So maybe CaloTowerDefs.h?

@slava77
Copy link
Contributor

slava77 commented May 22, 2017 via email

@slava77
Copy link
Contributor

slava77 commented May 23, 2017

+1

for #18805 72f73ba

  • technical; implemented as described. It looks like we can stay with *Fwd.h named files, since the alternative (renaming to *Defs.h is only semantically different and will introduce changes in many files including this).
  • jenkins tests pass

@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 requires discussion in the ORP meeting before it's merged. @davidlange6, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2017

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2017

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 1675 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 1837605
  • DQMHistoTests: Total failures: 22432
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1815000
  • DQMHistoTests: Total skipped: 173
  • DQMHistoTests: Total Missing objects: 0
  • Checked 94 log files, 14 edm output root files, 23 DQM output files

@slava77
Copy link
Contributor

slava77 commented Jun 6, 2017

+1

for #18805 5a6e0ab

  • technical;
  • jenkins tests pass

@alja
Copy link
Contributor

alja commented Jun 6, 2017

+1

@Martin-Grunewald
Copy link
Contributor

+1

@davidlange6 davidlange6 merged commit 8fdd0d4 into cms-sw:master Jun 7, 2017
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Nov 21, 2017
As discussed in PR cms-sw#18805, the *Fwd.h files aren't working with
forward declarations (due to `Ref` needing a definition). This
PR brings the same change to the HcalRecHitFwd.h header.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Nov 24, 2017
As discussed in PR cms-sw#18805, the *Fwd.h files aren't working with
forward declarations (due to `Ref` needing a definition). This
PR brings the same change to the HcalRecHitFwd.h header.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Nov 24, 2017
As discussed in PR cms-sw#18805, the Fwd.h headers need a definition of
the specific class they wrap. We do the same as we did for this PR
by renaming th efile to *Defs.h and actually including
HGCFETriggerDigi.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Nov 30, 2017
As discussed in PR cms-sw#18805, the Fwd.h headers need a definition of
the specific class they wrap. We do the same as we did for this PR
by renaming th efile to *Defs.h and actually including
HGCFETriggerDigi.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Dec 12, 2017
As discussed in PR cms-sw#18805, the Fwd.h headers need a definition of
the specific class they wrap. We do the same as we did for this PR
by renaming th efile to *Defs.h and actually including
HGCFETriggerDigi.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Dec 19, 2017
As discussed in PR cms-sw#18805, the Fwd.h headers need a definition of
the specific class they wrap. We do the same as we did for this PR
by renaming th efile to *Defs.h and actually including
HGCFETriggerDigi.
Teemperor added a commit to Teemperor/cmssw that referenced this pull request Dec 19, 2017
As discussed in PR cms-sw#18805, the Fwd.h headers need a definition of
the specific class they wrap. We do the same as we did for this PR
by renaming th efile to *Defs.h and actually including
HGCFETriggerDigi.
@Teemperor Teemperor deleted the FixCaloTowerFwd.h branch December 19, 2017 08:47
@Teemperor Teemperor restored the FixCaloTowerFwd.h branch December 19, 2017 10:43
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

8 participants