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

Replaced try...catch with ParameterSet::existsAs calls #2772

Merged

Conversation

Dr15Jones
Copy link
Contributor

This code was causing dozens of exceptions to be thrown and then
caught in production jobs. Since the code was only testing the
existence of a ParameterSet it was easy to replace with existsAs.

NOTE: It looks to me like this code is completely unnecessary.
The loop just before this one goes over the exact same parameter names
and asks for them as tracked parameters. If that succeeds, they can't
also be untracked so the code modified does nothing. If that fails
an exception is thrown and the code modified is never called.

This code was causing dozens of exceptions to be thrown and then
caught in production jobs. Since the code was only testing the
existence of a ParameterSet it was easy to replace with existsAs.

NOTE: It looks to me like this code is completely unnecessary.
The loop just before this one goes over the exact same parameter names
and asks for them as tracked parameters. If that succeeds, they can't
also be untracked so the code modified does nothing. If that fails
an exception is thrown and the code modified is never called.
@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 7, 2014

A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_1_X.

Replaced try...catch with ParameterSet::existsAs calls

It involves the following packages:

HLTriggerOffline/Higgs

@ojeda, @danduggan, @rovere, @cmsbuild, @nclopezo, @deguio, @Degano can you please review it and eventually sign? Thanks.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@nclopezo, @ktf you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@nclopezo nclopezo modified the milestones: CMSSW_7_1_0_pre5, CMSSW_7_1_0_pre4 Mar 10, 2014
@cmsbuild
Copy link
Contributor

@deguio
Copy link
Contributor

deguio commented Mar 11, 2014

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_1_X IBs unless changes (tests are also fine). @nclopezo, @ktf can you please take care of it?

nclopezo added a commit that referenced this pull request Mar 11, 2014
…lysis

HLTriggerOffline/Higgs -- Replaced try...catch with ParameterSet::existsAs calls
@nclopezo nclopezo merged commit 7db22b4 into cms-sw:CMSSW_7_1_X Mar 11, 2014
@Dr15Jones Dr15Jones deleted the avoidTryCatchInHLTHiggsSubAnalysis branch March 17, 2014 20:38
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