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

Maintainability cleanup for EventSelector #11143

Merged
merged 1 commit into from Sep 5, 2015

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Sep 4, 2015

This PR is a cleanup of the EventSelector class for maintainability and clarity. The changes include:

  1. Removing one unused and one unnecessary data member.
  2. Renaming some data members, function members, and function parameters to be more mnemonic
  3. The three data members that are never changed are made const (more for clarity than for const correctness) and initialized in the initializer lists of the class. They are no longer modified in init() (renamed to initPathNames()), because they were just being reset to the same values.
  4. The three const data members are the first three data members.
  5. Iterator loops are changed to range for loops.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

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

Maintainability cleanup for EventSelector

It involves the following packages:

FWCore/Framework

@cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@Martin-Grunewald, @wddgit this is something you requested to watch as well.
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.
If you are a L2 or a release manager you can ask for tests by saying 'please test' in the first line of a comment.
@Degano you are the release manager for this.
You can merge this pull request by typing 'merge' in the first line of your comment.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

The tests are being triggered in jenkins.

HLTGlobalStatus const& tr,
bool
EventSelector::acceptOneBit(Bits const& b,
HLTGlobalStatus const& tr,
hlt::HLTState const& s) const
{
bool lookForException = (s == hlt::Exception);
Bits::const_iterator i(b.begin());
Bits::const_iterator e(b.end());
Copy link
Contributor

Choose a reason for hiding this comment

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

why were these variables kept?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Chris,
Just an oversight. I will remove them when you let me know that you have no other suggested changes, or in a half hour or so if I don't hear from you.

Signed-off-by: wmtan <wmtan@fnal.gov>
@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

Pull request #11143 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 4, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs or unless it breaks tests. This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

-1
Tested at: f2a0a67
I found a compilation error while trying to compile with clang:
I used this command:
scram b vclean && scram build -k -j 8 USER_CXXFLAGS='-fsyntax-only' COMPILER='llvm compile'

1 warning generated.
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSetupRecord.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSetupRecordIntervalFinder.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSetupRecordKey.cc 
>> Compiling  /tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSetupRecordProvider.cc 
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSelector.cc:398:26: error: unused variable 'i' [-Werror,-Wunused-variable]
    Bits::const_iterator i(b.begin());
                         ^
/tmp/cmsbuild/workspace/ib-any-integration/CMSSW_7_6_X_2015-09-04-1700/src/FWCore/Framework/src/EventSelector.cc:399:26: error: unused variable 'e' [-Werror,-Wunused-variable]
    Bits::const_iterator e(b.end());
                         ^


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

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (but tests are reportedly failing). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (but tests are reportedly failing). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

This pull request is fully signed and it will be integrated in one of the next CMSSW_7_6_X IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @davidlange6, @Degano, @smuzaffar

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 5, 2015

@davidlange6
Copy link
Contributor

+1

cmsbuild added a commit that referenced this pull request Sep 5, 2015
Maintainability cleanup for EventSelector
@cmsbuild cmsbuild merged commit 6e9f7f0 into cms-sw:CMSSW_7_6_X Sep 5, 2015
@wmtan wmtan deleted the EventSelectorCleanup branch September 14, 2015 16:52
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