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

Print Error message when a module requests a data product without first registering the request via 'consumes' #79

Merged
merged 5 commits into from Jul 12, 2013

Conversation

Dr15Jones
Copy link
Contributor

The threaded framework requires that all modules register what data they may request by calling 'consumes', 'mayConsume' or 'consumesMany' in the module's constructor. This change will catch the cases where this was not done and on the first such request it will print an Error message to the MessageLogger.

When we move to the threaded framework all such unregistered data requests will cause a fatal exception to be thrown.

…onding consumes call

Each time a data product is gotten from the Event, LuminosityBlock or Run without having the module calling the corresponding consumes, mayConsume or consumesMany call we issue a MessageLogger warning.
This required passing back from the Principal exactly which ProductHolderIndex was used to find the data. In the fully threaded framework this will be changed to throw an exception.
Temporarily have the registeredToConsume* functions only return false the first time an unregistered item is checked. This avoids having the checker issue a warning message each time. This is only temporary since this is not thread safe and in the threaded framework such a case would cause a fatal exception.
…as been registered by the EDConsumerBase since if it has not been registered we need to fail before any attempt is made to run the Producer in unscheduled mode.
@ktf
Copy link
Contributor

ktf commented Jul 11, 2013

@nclopezo, can you please test this as usual? Thanks.

@nclopezo
Copy link
Contributor

Hi,

I took CMSSW_7_0_X_2013-07-11-0200 and pulled these changes but I got an
error when building. These are the steps that I followed:

scram p CMSSW_7_0_X_2013-07-11-0200
cd CMSSW_7_0_X_2013-07-11-0200/
cmsenv
git cms-merge-topic 79
git cms-checkdeps -a
scram b -j 12 >& building.log &

And the error that I got is the following:

In file included from
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/src/PileUpEventPrincipal.cc:1:0:
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:
In member function 'bool PileUpEventPrincipal::getByLabel(const
edm::InputTag&, edm::Handle&) const':
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:53:95:
error: no matching function for call to
'edm::EventPrincipal::getByLabel(edm::KindOfType, edm::TypeID, const
edm::InputTag&) const'
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:53:95:
note: candidates are:
In file included from
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/EventPrincipal.h:22:0,
from
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:7,
from
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/src/PileUpEventPrincipal.cc:1:
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:107:18:
note: edm::BasicHandle edm::Principal::getByLabel(edm::KindOfType, const
edm::TypeID&, const edm::InputTag&, const edm::EDConsumerBase_) const
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:107:18:
note: candidate expects 4 arguments, 3 provided
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:112:18:
note: edm::BasicHandle edm::Principal::getByLabel(edm::KindOfType, const
edm::TypeID&, const string&, const string&, const string&, const
edm::EDConsumerBase_) const
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:112:18:
note: candidate expects 6 arguments, 3 provided

David Mendez

On Thu, Jul 11, 2013 at 3:04 PM, Giulio Eulisse notifications@github.comwrote:

@nclopezo https://github.com/nclopezo, can you please test this as
usual? Thanks.


Reply to this email directly or view it on GitHubhttps://github.com//pull/79#issuecomment-20809199
.

@ktf
Copy link
Contributor

ktf commented Jul 11, 2013

@nclopezo please format messages so that we get nice reports. Eg.:

/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/src/PileUpEventPrincipal.cc:1:0:
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:
In member function 'bool PileUpEventPrincipal::getByLabel(const

Have a look at: http://github.github.com/github-flavored-markdown/ for the syntax.

@Dr15Jones can you look at the actual issue?

@nclopezo
Copy link
Contributor

This is the error:

In file included from /build/dmendezl/CMSSW_7_0_X_
2013-07-11-0200/src/SimGeneral/MixingModule/src/PileUpEventPrincipal.cc:1:0:
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h: In member function 'bool PileUpEventPrincipal::getByLabel(const edm::InputTag&, edm::Handle&) const':
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:53:95: error: no matching function for call to 'edm::EventPrincipal::getByLabel(edm::KindOfType, edm::TypeID, const edm::InputTag&) const'
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:53:95: note: candidates are:
In file included from /build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/EventPrincipal.h:22:0,
                 from /build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/interface/PileUpEventPrincipal.h:7,
                 from /build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/SimGeneral/MixingModule/src/PileUpEventPrincipal.cc:1:
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:107:18: note: edm::BasicHandle edm::Principal::getByLabel(edm::KindOfType, const edm::TypeID&, const edm::InputTag&, const edm::EDConsumerBase*) const
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:107:18: note:   candidate expects 4 arguments, 3 provided
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:112:18: note: edm::BasicHandle edm::Principal::getByLabel(edm::KindOfType, const edm::TypeID&, const string&, const string&, const string&, const edm::EDConsumerBase*) const
/build/dmendezl/CMSSW_7_0_X_2013-07-11-0200/src/FWCore/Framework/interface/Principal.h:112:18: note:   candidate expects 6 arguments, 3 provided

@Dr15Jones
Copy link
Contributor Author

The change I just made to my branch fixes the problem. Please try pulling again.

@cmsbuild
Copy link
Contributor

The following categories have been signed by chrjones (a.k.a. @Dr15Jones on GitHub): Core

@cms-git-visualization, @cms-git-core, @cms-git-geometry

@nclopezo
Copy link
Contributor

Hi,
I pulled again and ran the unit tests and RelVals. All the tests passed.

ktf added a commit that referenced this pull request Jul 12, 2013
Print Error message when a module requests a data product without first registering the request via 'consumes'
@ktf ktf merged commit a76e0ff into cms-sw:CMSSW_7_0_X Jul 12, 2013
@giamman giamman mentioned this pull request Jul 12, 2013
jshlee referenced this pull request in jshlee/cmssw Feb 27, 2014
update LCT reconstruction in ME1/a + Add GEM pad matching functions
nclopezo added a commit to nclopezo/cmssw that referenced this pull request Nov 21, 2014
Use the github status api to indicate the status of the pull request
gpetruc added a commit to gpetruc/cmssw that referenced this pull request Nov 23, 2014
…CMSSW_7_0_6

Updates to 7.0.X: electron ids, mc matching, fix multiloop
gdimperi pushed a commit to gdimperi/cmssw that referenced this pull request Jun 21, 2015
save post-fit snapshot in workspace for MultiDimFit and add ability to l...
arizzi added a commit to arizzi/cmssw that referenced this pull request Jun 23, 2015
added current datasets in 74X at 25ns
jpata pushed a commit to jpata/cmssw that referenced this pull request Dec 2, 2016
…heck

Thank you! and also thanks for the independent PRs, this is very practical for the review.
mastrolorenzo pushed a commit to mastrolorenzo/cmssw that referenced this pull request Feb 16, 2017
mverwe pushed a commit to mverwe/cmssw that referenced this pull request Mar 8, 2017
tstreble pushed a commit to tstreble/cmssw that referenced this pull request Nov 23, 2017
Updated L1 information using dedicated MINIAOD collections
mbluj pushed a commit to mbluj/cmssw that referenced this pull request Sep 7, 2018
Jingyan95 pushed a commit to Jingyan95/cmssw that referenced this pull request May 28, 2021
* Fix to compiler warning and removal of hardoded value in MatchCalculator

* Updates to fix names of pins to make unique

* Migrate to new format of table for phi correction memory

* Remove unused TETableBase class

* Cleanup of VMRouterTable

* Cleanup of LUT for bend consistency

* Cleanup of LUT used in MEU for bend consistency

* Cleanup code for disk bend table

* cleanup of code to generate table used by TE

* Cleanup of TP LUTs

* Cleanup of LUTs for MatchCalculator cuts

* Fix names of new LUT when writing to files

* Cleanup of writing LUTs for the combined modules

* Add code to write projection bend table for disk projections

* More cleanup to remove hard coded layer and seed numbers

* Cleanup of hardcoded numbers

* Remove few more hardcoded constants:

* Some further cleanup based on comments from Louise S.

Co-authored-by: Anders Ryd <ryd@Anderss-MacBook-Pro.local>
Co-authored-by: Louise Skinnari <louise.skinnari@cern.ch>
cmsbuild pushed a commit that referenced this pull request Jul 7, 2021
* Fix to compiler warning and removal of hardoded value in MatchCalculator

* Updates to fix names of pins to make unique

* Migrate to new format of table for phi correction memory

* Remove unused TETableBase class

* Cleanup of VMRouterTable

* Cleanup of LUT for bend consistency

* Cleanup of LUT used in MEU for bend consistency

* Cleanup code for disk bend table

* cleanup of code to generate table used by TE

* Cleanup of TP LUTs

* Cleanup of LUTs for MatchCalculator cuts

* Fix names of new LUT when writing to files

* Cleanup of writing LUTs for the combined modules

* Add code to write projection bend table for disk projections

* More cleanup to remove hard coded layer and seed numbers

* Cleanup of hardcoded numbers

* Remove few more hardcoded constants:

* Some further cleanup based on comments from Louise S.

Co-authored-by: Anders Ryd <ryd@Anderss-MacBook-Pro.local>
Co-authored-by: Louise Skinnari <louise.skinnari@cern.ch>
thesps pushed a commit to thesps/cmssw that referenced this pull request Dec 10, 2021
Global Trigger data types & jets pattern files
jfernan2 pushed a commit to jfernan2/cmssw that referenced this pull request Jan 27, 2022
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