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 boost use in CalibFormats/SiStripObjects #30130

Merged
merged 1 commit into from Jun 12, 2020

Conversation

camolezi
Copy link
Contributor

@camolezi camolezi commented Jun 6, 2020

PR description:

Replaced boost library use for C++ STL alternatives. The code should have similar behavior.

PR validation:

Passed on basic runTheMatrix test.

if this PR is a backport please specify the original PR and why you need to backport that PR:

@vgvassilev @davidlange6

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30130/15912

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 6, 2020

A new Pull Request was created by @camolezi (Lucas Camolezi) for master.

It involves the following packages:

CalibFormats/SiStripObjects

@cmsbuild, @pohsun, @christopheralanwest, @tocheng, @tlampen can you please review it and eventually sign? Thanks.
@mmusich, @threus, @tocheng this is something you requested to watch as well.
@silviodonato, @dpiparo you are the release manager for this.

cms-bot commands are listed here

@mmusich
Copy link
Contributor

mmusich commented Jun 6, 2020

Hello,
out of curiosity - as I see this is one of a series - has the usage of boost become totally discouraged in cmssw?

@camolezi
Copy link
Contributor Author

camolezi commented Jun 6, 2020

I think @vgvassilev @davidlange6 would be better suited to answer that.

@guitargeek
Copy link
Contributor

guitargeek commented Jun 6, 2020

Hi, this looks like a good opportunity to make the code more readable.

What do you think about using lambda functions instead? From my experience, it's worth to at least consider lambda functions everywhere boost::bind was used previously. Lambdas are often more compact and readable.

    std::remove_copy_if(
        runInfo->m_fed_in.begin(),
        runInfo->m_fed_in.end(),
        std::back_inserter(activeFedsFromRunInfo),
        [&](int x){ return !(x >= int(FEDNumbering::MINSiStripFEDID)
                          && x <= int(FEDNumbering::MAXSiStripFEDID)); });

You also don't need the <functional> header in this case.

@vgvassilev
Copy link
Contributor

Hello,
out of curiosity - as I see this is one of a series - has the usage of boost become totally discouraged in cmssw?

I cannot speak for cmssw but from general engineering perspective having less library dependencies reduces the technical debt. I would say that the usage of boost should be encouraged in cases where facilities in the standard library fall short ;)

@camolezi
Copy link
Contributor Author

camolezi commented Jun 7, 2020

Hi, this looks like a good opportunity to make the code more readable.

What do you think about using lambda functions instead? From my experience, it's worth to at least consider lambda functions everywhere boost::bind was used previously. Lambdas are often more compact and readable.

    std::remove_copy_if(
        runInfo->m_fed_in.begin(),
        runInfo->m_fed_in.end(),
        std::back_inserter(activeFedsFromRunInfo),
        [&](int x){ return !(x >= int(FEDNumbering::MINSiStripFEDID)
                          && x <= int(FEDNumbering::MAXSiStripFEDID)); });

You also don't need the <functional> header in this case.

Yeah, thanks. I agree that using a lambda function, in this case, is much more cleaner. I will update the PR.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-30130/15918

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

Pull request #30130 was updated. @cmsbuild, @pohsun, @christopheralanwest, @tocheng, @tlampen can you please check and sign again.

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/6866/console Started: 2020/06/07 19:51

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

+1
Tested at: 22245ba
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4ef368/6866/summary.html
CMSSW: CMSSW_11_2_X_2020-06-07-0000
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Jun 7, 2020

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-4ef368/6866/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 36
  • DQMHistoTests: Total histograms compared: 2780497
  • DQMHistoTests: Total failures: 16
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2780431
  • DQMHistoTests: Total skipped: 50
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 35 files compared)
  • Checked 152 log files, 16 edm output root files, 36 DQM output files

@pohsun
Copy link

pohsun commented Jun 12, 2020

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo (and backports should be raised in the release meeting by the corresponding L2)

@silviodonato
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit b843fc8 into cms-sw:master Jun 12, 2020
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

8 participants