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

Do not register parameter set in a constructor #256

Merged
merged 1 commit into from Aug 8, 2013

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Aug 8, 2013

There is a public constructor of ParameterSet that registers the constructed parameter set. This complicates thread safety, because it is hard to find instances of this particular constructor.
This pull request makes this constructor private, and removes the registration from this constructor. It adds a new public static function of ParameterSet (registerfromString) that invokes this constructor and registers the constructed parameter set.
The only place in CMSSW where this constructor is called is modified to call the new static function.
The new static function has the same thread safety issues as the constructor had previously, but it is much easier to find, and much less likely to be used inappropriately.

@nclopezo
Copy link
Contributor

nclopezo commented Aug 8, 2013

Hi,

I took CMSSW_7_0_X_2013-08-08-0200, pulled these changes, and ran the RelVals (It tested these changes including also the ones in #257, to avoid unrelated errors) and unit tests, all tests passed.

@ktf
Copy link
Contributor

ktf commented Aug 8, 2013

@Dr15Jones can you sign? Thanks.

@cmsbuild
Copy link
Contributor

cmsbuild commented Aug 8, 2013

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

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

ktf added a commit that referenced this pull request Aug 8, 2013
Do not register parameter set in a constructor
@ktf ktf merged commit 961c994 into cms-sw:CMSSW_7_0_X Aug 8, 2013
@wmtan wmtan deleted the doNotUpdateRegistryInConstructor branch August 8, 2013 14:42
makortel pushed a commit to makortel/cmssw that referenced this pull request Apr 22, 2015
fwyzard pushed a commit to fwyzard/cmssw that referenced this pull request Jan 21, 2019
mandrenguyen added a commit to mandrenguyen/cmssw that referenced this pull request Oct 3, 2019
cmsbuild pushed a commit that referenced this pull request Mar 12, 2024
…256)

* Document writeMonitorData cfg

* Update README.md
sarafiorendi pushed a commit to sarafiorendi/cmssw that referenced this pull request Mar 14, 2024
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

4 participants