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

Implement propagate_const in the framework #13093

Merged
merged 3 commits into from Jan 29, 2016

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Jan 27, 2016

This PR supersedes PR #13015.
This PR uses the propagate_const template for most pointers in the framework that are data members of classes or structs, and makes the knock on changes caused by this. This means that a const member function of the class will no longer be able to modify the data to which the pointer points. This PR is therefore a partial implementation of issue #12840. The member pointers in the framework that are not modified by this PR are:

  1. Those in FWLite (will be done in a separate PR).
  2. Pointers to const or pointers already declared mutable (no need to modify).
  3. Those pointers whose modifications require changes that were too extensive or complex to be done in this PR. These will be dealt within a case by case basis.
    Other minor changes made in a very few places in affected code:
    a) a few boost::scoped_ptr changed to std::unique_ptr
    b) a few std::auto_ptr changed to std::unique_ptr
    c) iterator loops replaced by range based for loops
    d) nullptr replaces 0 for pointers

This PR does not change any instances of boost::shared_ptr to std::shared_ptr, because most of these have already been changed in previous PR's, and the ones remaining are not trivial to change. These will be changed in subsequent PR's where feasible.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wmtan for CMSSW_8_0_X.

It involves the following packages:

DataFormats/Common
DataFormats/Provenance
FWCore/Catalog
FWCore/Framework
FWCore/Integration
FWCore/MessageLogger
FWCore/MessageService
FWCore/Modules
FWCore/ParameterSet
FWCore/ServiceRegistry
FWCore/Services
FWCore/Sources
FWCore/TFWLiteSelector
FWCore/Utilities
IOMC/Input
IOMC/RandomEngine
IOPool/Common
IOPool/Input
IOPool/Output
IOPool/SecondaryInput
IOPool/Streamer
IOPool/TFileAdaptor
Utilities/StorageFactory
Utilities/XrdAdaptor

@cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel, @Martin-Grunewald, @wddgit this is something you requested to watch as well.
@slava77, @Degano, @smuzaffar you are the release manager for this.

cms-bot commands are list here #13028

@wmtan
Copy link
Contributor Author

wmtan commented Jan 27, 2016

@cmsbuild please test

@cmsbuild
Copy link
Contributor

@@ -414,7 +417,7 @@ namespace edm {
virtual void endRun(Run&);
virtual void beginJob();
virtual void endJob();
virtual SharedResourcesAcquirer* resourceSharedWithDelayedReader_() const;
virtual SharedResourcesAcquirer* resourceSharedWithDelayedReader_();

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 to return ptr to non-const in const function because the SharedResourcesAcquirer is mutable.

@Dr15Jones
Copy link
Contributor

please test

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/10820/console

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_8_0_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

-1
Tested at: ff8dcc2
I found an error when building:

>> Compiling edm plugin /afs/cern.ch/cms/sw/ReleaseCandidates/jenkins-workarea/area3.10G/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-27-2300/src/GeneratorInterface/BeamHaloGenerator/src/BeamHaloProducer.cc 
>> Compiling edm plugin /afs/cern.ch/cms/sw/ReleaseCandidates/jenkins-workarea/area3.10G/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-27-2300/src/GeneratorInterface/BeamHaloGenerator/src/PYR.cc 
>> Compiling edm plugin /afs/cern.ch/cms/sw/ReleaseCandidates/jenkins-workarea/area3.10G/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-27-2300/src/GeneratorInterface/BeamHaloGenerator/src/SealModule.cc 
>> Compiling  /afs/cern.ch/cms/sw/ReleaseCandidates/jenkins-workarea/area3.10G/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-27-2300/src/GeneratorInterface/BeamHaloGenerator/src/ki_bhg_fill.F 
>> Compiling  /afs/cern.ch/cms/sw/ReleaseCandidates/jenkins-workarea/area3.10G/workspace/ib-any-integration/CMSSW_8_0_X_2016-01-27-2300/src/GeneratorInterface/BeamHaloGenerator/src/ki_bhg_init.F 
f951: fatal error: error closing /tmp/cmsbuild/cchJDXFy.s: No space left on device
compilation terminated.
f951: fatal error: error closing /tmp/cmsbuild/cc7eP9wy.s: No space left on device
compilation terminated.
Fatal Error: output filename specified twice
Fatal Error: output filename specified twice


you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-13093/10820/summary.html

@wmtan
Copy link
Contributor Author

wmtan commented Jan 28, 2016

@cmsbuild @Dr15Jones @davidlange6 The build error has nothing to do with this PR. Your disk ran out of space.

@wmtan
Copy link
Contributor Author

wmtan commented Jan 28, 2016

@cmsbuild please test

@cmsbuild
Copy link
Contributor

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/10830/console

@cmsbuild
Copy link
Contributor

-1

Tested at: ff8dcc2
I found errors in the following unit tests:

---> test runtestSimCalorimetryHGCalSimProducers had ERRORS
---> test runtestRecoLocalCaloHGCalRecProducers had ERRORS

you can see the results of the tests here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-13093/10830/summary.html

@cmsbuild
Copy link
Contributor

davidlange6 added a commit that referenced this pull request Jan 29, 2016
Implement propagate_const in the framework
@davidlange6 davidlange6 merged commit 840efb4 into cms-sw:CMSSW_8_0_X Jan 29, 2016
@wmtan wmtan deleted the PropagateConstRedux branch February 5, 2016 20:19
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