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

Using new Event::get and ::getHandle in PFProducers #25681

Merged
merged 1 commit into from Jan 29, 2019
Merged

Using new Event::get and ::getHandle in PFProducers #25681

merged 1 commit into from Jan 29, 2019

Conversation

guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Jan 16, 2019

This PR builds on top of #25707 to replace the occurrences of getByToken with the more modern get and getHandle in RecoParticleFlow/PFProducer.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

//Assign the PFAlgo Parameters
setPFVertexParameters(vertices.product());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if there are no vertices in the event, the call to Handle::product() will already raise a readable error [1], so the log might not be needed?

[1] https://github.com/cms-sw/cmssw/blob/master/FWCore/Framework/interface/GenericHandle.h#L105

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25681/8031

  • This PR adds an extra 96KB to repository

LOGDRESSED("PFEGammaProducer")<<"getting blocks"<<std::endl;
bool found = iEvent.getByToken( inputTagBlocks_, blocks );
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would be a good opportunity to use the auto handle = iEvent.getHandle(token_).makeValidHandle(); as @makortel suggested. Then, the following checks would truly unnecessary. Do you already have a specific implementation is mind for makeValidHandle()?

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @guitargeek (Jonas Rembser) for master.

It involves the following packages:

FWCore/Framework
RecoParticleFlow/PFProducer

@perrotta, @smuzaffar, @cmsbuild, @Dr15Jones, @slava77 can you please review it and eventually sign? Thanks.
@mmarionncern, @makortel, @cbernet, @wddgit, @lgray, @Martin-Grunewald, @seemasharmafnal, @hatakeyamak, @bachtis this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here


//Assign the PFAlgo Parameters
pfAlgo_->setPFVertexParameters(useVerticesForNeutral_,vertices.product());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as for PFEGammaProducer; I think the logging before is not necessary because product() throws an exception already.

@Dr15Jones
Copy link
Contributor

-1
@guitargeek I'm glad you are enthusiastic about our suggestions, however the framework group is still working out exactly how we want to do it. Once we have decided, we will make the needed changes to Event, Run and LuminosityBlock.

@guitargeek
Copy link
Contributor Author

Ok! I'm happy to know you are working on it, that was not really clear in the issue thread! I suppose I can keep using this version privately and can then migrate my analysis code to what you will come up with without any effort :)

@guitargeek guitargeek closed this Jan 16, 2019
@guitargeek guitargeek reopened this Jan 20, 2019
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@guitargeek guitargeek changed the title First step in modernizing product retrieval from Event Using new Event::get and ::getHandle in PFProducers Jan 20, 2019
@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25681/8099

  • This PR adds an extra 88KB to repository

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 24, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/32808/console Started: 2019/01/24 07:58

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@perrotta
Copy link
Contributor

+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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@fabiocos
Copy link
Contributor

code-checks

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25681/8203

  • This PR adds an extra 92KB to repository

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 0530f78 into cms-sw:master Jan 29, 2019
@guitargeek guitargeek deleted the new_event_interface_pfproducers branch January 29, 2019 18:46
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

5 participants