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

'consumes' migration in JetMETCorrections/Type1MET #1572

Merged
merged 12 commits into from
Nov 26, 2013

Conversation

TaiSakuma
Copy link
Contributor

No description provided.

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @TaiSakuma (Tai Sakuma) for CMSSW_7_0_X.

'consumes' migration in JetMETCorrections/Type1MET

It involves the following packages:

JetMETCorrections/Type1MET

@cmsbuild, @vadler, @nclopezo 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.
@ktf you are the release manager for this.

@cmsbuild
Copy link
Contributor

@vadler
Copy link

vadler commented Nov 24, 2013

@TaiSakuma : Thanx a lot for this one!
However, I can still see some "getByLabel"s (grep -n getByLabel):

JetMETCorrections/Type1MET/data/FWLiteFunc.C:286:    muonCollection.getByLabel(ev,"muons");
JetMETCorrections/Type1MET/data/FWLiteFunc.C:289:    metCollection.getByLabel(ev,"met");
JetMETCorrections/Type1MET/interface/CorrectedMETProducerT.h:91:    evt.getByLabel(src_, rawMEtCollection);
JetMETCorrections/Type1MET/plugins/Type2CorrectionProducer.cc:135:      evt.getByLabel(*inputTag, unclEnergySummand);
JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc:69:      evt.getByLabel(*srcCHSSum, chsSum);
JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc:82:      evt.getByLabel(*srcType1Correction, type1Correction);
JetMETCorrections/Type1MET/src/METCorrectionAlgorithm.cc:102:   evt.getByLabel(*srcUnclEnergySum, unclEnergySummand);

The first two are understood due to FWLite, but the others should be includes as well. Could you please complete them, too?

@cmsbuild
Copy link
Contributor

Pull request #1572 was updated. @cmsbuild, @vadler, @nclopezo can you please check and sign again.

@TaiSakuma
Copy link
Contributor Author

@vadler, I did the migration for Type2CorrectionProducer.

I am working on METCorrectionAlgorithm now. I have a question about how to implement the migration here. This is not a produce but a class that producer uses. And this class uses another class. So it seems I need to pass around edm::ConsumesCollector.

However, I will get the following error when I try to let METCorrectionAlgorithm hand over edm::ConsumesCollector to another class.

error: cannot bind 'edm::ConsumesCollector' lvalue to 'edm::ConsumesCollector&&'

Schematically,
producer -> class A -> class B
Both class A and class B call getByLable(). So I would like to pass edm::ConsumesCollector from producer to class A then to class B.
class A can receive edm::ConsumesCollector and can call getByToken(). However, I cannot figure out how class B can call receive edm::ConsumesCollector.

@Dr15Jones
Copy link
Contributor

Have class B use a edm::ConsumerCollector& not a edm::ConsumerCollector&&.

@TaiSakuma
Copy link
Contributor Author

@Dr15Jones, Thank you. It is compiled now.

@vadler
Copy link

vadler commented Nov 25, 2013

@TaiSakuma
Copy link
Contributor Author

@vadler, thanks for the reference.

@TaiSakuma
Copy link
Contributor Author

I think that the migration is done for JetMETCorrections/Type1MET.

@cmsbuild
Copy link
Contributor

Pull request #1572 was updated. @cmsbuild, @vadler, @nclopezo can you please check and sign again.

@vadler
Copy link

vadler commented Nov 25, 2013

+1
Indeed, it is :-)
@TaiSakuma : For future migrations with vectors of tokens you may find this one useful:
https://hypernews.cern.ch/HyperNews/CMS/get/edmFramework/3153/1/3/1/1/1/1.html
which can be used directly in the initialisation part of a c'tor.

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it?

@cmsbuild
Copy link
Contributor

ktf added a commit that referenced this pull request Nov 26, 2013
Consumes migration -- JetMETCorrections/Type1MET
@ktf ktf merged commit e01dd5b into cms-sw:CMSSW_7_0_X Nov 26, 2013
ggovi pushed a commit to ggovi/cmssw that referenced this pull request Jan 11, 2017
…ntier

fix for timestamp handling in coral frontier and sqlite plugins
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.

5 participants