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

Make all registry data members non-mutable #167

Merged

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Jul 23, 2013

This pull request is another small step towards the multithreaded framework. It eliminates the last three mutable data members from registries. The Parentage, ProcessConfiguration, and ProcessHistory classes each contained a mutable cached hash id used for storage in a registry. In the case of Parentage, the cached ID is simply removed, because it is not needed. In the case of the other two classes, the cached ID is made non mutable. The "id()" function remains const, because, while it still reads from the cache, it no longer fills the cache. A new "set" function fills the cache when needed.
Also, in the case of Parentage, a non-const function with the same name as a const function is removed and replaced with other functions.
Also, "for" loops affected by this change are changed to C++11 range for loops.
This code has been fully tested with checkdeps -a. All framework unit tests and relval matrix tests pass.

@cmsbuild
Copy link
Contributor

The following categories have been signed by chrjones (a.k.a. @Dr15Jones on GitHub): Core

@cms-git-visualization, @cms-git-core, @cms-git-geometry

void initializeTransients() {transient_.reset();}

struct Transients {
Copy link
Contributor

Choose a reason for hiding this comment

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

I assumed this stayed to avoid backwards compatibility problems?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Possible backward compatibility problems was one reason.
    Other reasons:
  2. Removing it forces tricky changes in classes_def.xml which are non-trivial to get right, if they work at all.
  3. Future proofing against a subsequent addition of new transient data members.
  4. Standardization: Keeping it makes it like other registries.
    Bill

@nclopezo
Copy link
Contributor

Hi,
I took CMSSW_7_0_X_2013-07-23-0200, pulled these changes and ran the unit tests and RelVals, all the tests passed.

smuzaffar added a commit that referenced this pull request Jul 24, 2013
Make all registry data members non-mutable
@smuzaffar smuzaffar merged commit f6c2c21 into cms-sw:CMSSW_7_0_X Jul 24, 2013
@wmtan wmtan deleted the AllRegistryDataMembersNonMutable branch July 24, 2013 18:28
nclopezo added a commit to nclopezo/cmssw that referenced this pull request Nov 21, 2014
…-ib-pages

Generate a summary json file with the latest IB per release queue
parbol pushed a commit to parbol/cmssw that referenced this pull request Mar 5, 2015
thomreis added a commit to thomreis/cmssw that referenced this pull request Feb 23, 2016
mariadalfonso added a commit to mariadalfonso/cmssw that referenced this pull request Dec 18, 2017
add plots of Ch-higgs_Pt, add TTBar category classification
cerminar pushed a commit to cerminar/cmssw that referenced this pull request Mar 9, 2018
Backport DRNN clustering + ntuple updates
fwyzard added a commit to makortel/cmssw that referenced this pull request Sep 13, 2018
Pre-compute few constants that could not be declared constexpr.
Reduce temporary buffer size.
Reduce the block size of the calls to gpuPixelDoublets::getDoubletsFromHisto() from 256 to 64, to make better usage of the GPU processors.
dsosnov pushed a commit to dsosnov/cmssw that referenced this pull request Nov 14, 2018
* Revert "Revert "Fix for trkMVA branch in trackTree" (cms-sw#164)"

This reverts commit f793d57.

in official AOD: floats_generalTracks_MVAValues_RECO.obj : vector<float>
bi-ran added a commit to bi-ran/cmssw that referenced this pull request Jan 24, 2019
* Revert "Revert "Fix for trkMVA branch in trackTree" (cms-sw#164)"

This reverts commit f793d57.

in official AOD: floats_generalTracks_MVAValues_RECO.obj : vector<float>
slava77 pushed a commit to slava77/cmssw that referenced this pull request Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants