cms-sw / cmssw

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

Using modifier to enable/disable ESPrefer #30986

Open kpedro88 opened 4 years ago

kpedro88 commented 4 years ago

Currently, the only way to enable/disable an ESPrefer with a modifier requires using makeProcessModifier, e.g.: https://github.com/cms-sw/cmssw/blob/31f0a02297414ae801c4b0d78ad3b01b24dd6c86/Configuration/StandardSequences/python/Digi_cff.py#L73-L81

It would be preferable to support a more natural approach. One possibility would be allowing ESPrefers to be placed in Tasks (ESProducers and ESSources are already compatible with Tasks). In that case, the modifier could just replace the task to enable or disable the ESPrefer.

kpedro88 commented 4 years ago

assign core

cmsbuild commented 4 years ago

New categories assigned: core

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

cmsbuild commented 4 years ago

A new Issue was created by @kpedro88 Kevin Pedro.

@Dr15Jones, @dpiparo, @silviodonato, @smuzaffar, @makortel, @qliphy can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

makortel commented 4 years ago

An alternative would be to allow construction of empty ESPrefer. The Modifier.toReplaceWith() already works with ESPrefer out of the box.

The ESPrefer has some similarities to EDAlias (redirection of which producers are run), and both are more for Process-level "customization" than something that should come in via individual Tasks. (e.g. what if two Tasks include the same ESProducer, should they always include the same ESPrefer as well?