Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:28:27

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("Test")
0004 
0005 process.WaitingService = cms.Service("WaitingService")
0006 
0007 process.source = cms.Source("EmptySource")
0008 
0009 process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1))
0010 
0011 process.options = cms.untracked.PSet(
0012     numberOfThreads = cms.untracked.uint32(2),
0013     numberOfStreams = cms.untracked.uint32(0)
0014 )
0015 
0016 process.waiter = cms.EDProducer("AcquireIntProducer",
0017                                 streamsToAccumulate = cms.untracked.uint32(3),
0018                                 tags = cms.VInputTag("busy1", "busy2"),
0019                                 produceTag = cms.InputTag("busy3")
0020 )
0021 
0022 process.filterwaiter = cms.EDFilter("AcquireIntFilter",
0023                                     streamsToAccumulate = cms.untracked.uint32(3),
0024                                     tags = cms.VInputTag("busy1", "busy2"),
0025                                     produceTag = cms.InputTag("busy3")
0026 )
0027 
0028 process.streamwaiter = cms.EDProducer("AcquireIntStreamProducer",
0029                                       streamsToAccumulate = cms.untracked.uint32(3),
0030                                       tags = cms.VInputTag("busy1", "busy2"),
0031                                       produceTag = cms.InputTag("busy3")
0032 )
0033 
0034 process.streamfilterwaiter = cms.EDFilter("AcquireIntStreamFilter",
0035                                           streamsToAccumulate = cms.untracked.uint32(3),
0036                                           tags = cms.VInputTag("busy1", "busy2"),
0037                                           produceTag = cms.InputTag("busy3")
0038 )
0039 
0040 process.busy1 = cms.EDProducer("BusyWaitIntProducer",ivalue = cms.int32(1), iterations = cms.uint32(10*1000*1000))
0041 process.busy2 = cms.EDProducer("BusyWaitIntProducer",ivalue = cms.int32(2), iterations = cms.uint32(10*1000*1000))
0042 process.busy3 = cms.EDProducer("BusyWaitIntProducer",ivalue = cms.int32(2), iterations = cms.uint32(10*1000*1000))
0043 
0044 process.tester = cms.EDAnalyzer("IntTestAnalyzer",
0045                                 moduleLabel = cms.untracked.InputTag("waiter"),
0046                                 valueMustMatch = cms.untracked.int32(5))
0047 
0048 process.filtertester = cms.EDAnalyzer("IntTestAnalyzer",
0049                                       moduleLabel = cms.untracked.InputTag("filterwaiter"),
0050                                       valueMustMatch = cms.untracked.int32(5))
0051 
0052 process.streamtester = cms.EDAnalyzer("IntTestAnalyzer",
0053                                       moduleLabel = cms.untracked.InputTag("streamwaiter"),
0054                                       valueMustMatch = cms.untracked.int32(5))
0055 
0056 process.streamfiltertester = cms.EDAnalyzer("IntTestAnalyzer",
0057                                             moduleLabel = cms.untracked.InputTag("streamfilterwaiter"),
0058                                             valueMustMatch = cms.untracked.int32(5))
0059 
0060 process.task = cms.Task(process.busy1, process.busy2, process.busy3,
0061                         process.waiter, process.filterwaiter,
0062                         process.streamwaiter, process.streamfilterwaiter)
0063 
0064 process.testParentage1 = cms.EDAnalyzer("TestParentage",
0065                                         inputTag = cms.InputTag("waiter"),
0066                                         expectedAncestors = cms.vstring("busy1", "busy2", "busy3")
0067 )
0068 
0069 process.testParentage2 = cms.EDAnalyzer("TestParentage",
0070                                         inputTag = cms.InputTag("filterwaiter"),
0071                                         expectedAncestors = cms.vstring("busy1", "busy2", "busy3")
0072 )
0073 
0074 process.testParentage3 = cms.EDAnalyzer("TestParentage",
0075                                         inputTag = cms.InputTag("streamwaiter"),
0076                                         expectedAncestors = cms.vstring("busy1", "busy2", "busy3")
0077 )
0078 
0079 process.testParentage4 = cms.EDAnalyzer("TestParentage",
0080                                         inputTag = cms.InputTag("streamfilterwaiter"),
0081                                         expectedAncestors = cms.vstring("busy1", "busy2", "busy3")
0082 )
0083 
0084 process.p1 = cms.Path(process.tester + process.testParentage1, process.task)
0085 process.p2 = cms.Path(process.filtertester + process.testParentage2, process.task)
0086 process.p3 = cms.Path(process.streamtester + process.testParentage3, process.task)
0087 process.p4 = cms.Path(process.streamfiltertester + process.testParentage4, process.task)