cms-sw / cmssw

CMS Offline Software
http://cms-sw.github.io/
Apache License 2.0
1.09k stars 4.33k forks source link

Need better error message for 'put' into wrong transition #20690

Open Dr15Jones opened 7 years ago

Dr15Jones commented 7 years ago

If one calls produces with one transition, e.g. edm::Transition::BeginRun, but does the put on a different transition, e.g. end Run, then the error message one gets is confusing because it only says that the module is supposed to produce a data product for a given Principal (e.g. the Run) but not the exact transition.

Dr15Jones commented 7 years ago

An example is the following had a data product registered for edm::Transition::BeginLuminosityBlock but the put happened at end LuminosityBlock

----- Begin Fatal Exception 27-Sep-2017 21:16:52 CEST-----------------------
An exception of category 'InsertFailure' occurred while
   [0] Processing global end LuminosityBlock run: 165121 luminosityBlock: 62
   [1] Calling method for module AlcaPCCProducer/'alcaPCCProducerZBFromRECO'
Exception Message:
Illegal attempt to 'put' an unregistered product.
No product is registered for
  product friendly class name: 'recoPixelClusterCounts'
  module label:                'alcaPCCProducerZBFromRECO'
  product instance name:       'alcaPCCZeroBiasFromRECO'
  process name:                'RECO'
The following data products are registered for production by alcaPCCProducerZBFromRECO:
Branch Type = LuminosityBlock
Process Name = RECO
ModuleLabel = alcaPCCProducerZBFromRECO
Branch ID = 988408592
Class Name = reco::PixelClusterCounts
Friendly Class Name = recoPixelClusterCounts
Product Instance Name = alcaPCCZeroBiasFromRECO
-----

To correct the problem:
   1) make sure the proper 'produce' call is being made in the module's constructor,
   2) if 'produce' exists and uses a product instance name make sure that same name is used during the 'put' call.
----- End Fatal Exception -------------------------------------------------
cmsbuild commented 7 years ago

A new Issue was created by @Dr15Jones Chris Jones.

@davidlange6, @Dr15Jones, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

Dr15Jones commented 7 years ago

assign core

cmsbuild commented 7 years ago

New categories assigned: core

@Dr15Jones,@smuzaffar you have been requested to review this Pull request/Issue and eventually sign? Thanks