import FWCore.ParameterSet.Config as cms my_module = cms.EDProducer('MyProducer', input_collection = cms.InputTag('my_source'), output_collection = cms.string('my_output'), my_parameter = cms.double(1.23) )
import FWCore.ParameterSet.Config as cms my_output_module = cms.OutputModule('PoolOutputModule', fileName = cms.untracked.string('my_output.root') ) my_module = cms.EDProducer('MyProducer', input_collection = cms.InputTag('my_source'), output_collection = cms.string('my_output'), my_parameter = cms.double(1.23) ) my_path = cms.Path(my_module) my_endpath = cms.EndPath(my_output_module)This example defines an EDProducer module called "MyProducer" and an output module called "my_output_module". The output module is customized to write the output to a ROOT file called "my_output.root". The EDProducer module takes an input collection called "my_source" and produces an output collection called "my_output". The workflow is defined using a Path and EndPath, where the Path includes the EDProducer module and the EndPath includes the output module. In summary, FWCore.ParameterSet Config EDProducer provides a convenient way to define modules that produce data in the CMS framework. It is part of the FWCore.ParameterSet package library in Python.