Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:12:50

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 
0005 process.load("FWCore.Framework.test.cmsExceptionsFatal_cff")
0006 process.load("FWCore.MessageService.MessageLogger_cfi")
0007 process.MessageLogger.cerr.INFO.limit = 10000000
0008 
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(5)
0011 )
0012 
0013 process.source = cms.Source("EmptySource")
0014 
0015 # This should run because it's consumed directly by process.consumer
0016 process.thing = cms.EDProducer("ThingProducer")
0017 
0018 # This should not run, because it's mot consumed by any other module
0019 process.notRunningThing = cms.EDProducer("ThingProducer")
0020 
0021 # This should run because it's consumed indirectly by process.consumer, via process.otherThing
0022 process.anotherThing = cms.EDProducer("ThingProducer")
0023 
0024 # This should run because it's consumed directly by process.consumer
0025 process.otherThing = cms.EDProducer("OtherThingProducer",
0026     thingTag = cms.InputTag('anotherThing'),
0027     transient = cms.untracked.bool(True)
0028 )
0029 
0030 # Make the various modules available for unscheduled execution
0031 process.task = cms.Task(
0032     process.thing,
0033     process.anotherThing,
0034     process.otherThing,
0035     process.notRunningThing
0036 )
0037 
0038 # Consumes the products of process.thing and process.otherThing, causing them to run
0039 process.consumer = cms.EDAnalyzer("GenericConsumer",
0040     eventProducts = cms.untracked.vstring("*_thing_*_*", "otherThing"),
0041     verbose = cms.untracked.bool(True)
0042 )
0043 
0044 # Explicilty schedule process.consumer, causing it to run along with its dependencies, provided by process.task
0045 process.path = cms.Path(process.consumer, process.task)
0046 
0047 # Print the summary of all modules that were run 
0048 # The content of the summary is tested by testGenericConsumer.sh
0049 process.options.wantSummary = True