Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("FIRST")
0004 
0005 process.maxEvents = cms.untracked.PSet(
0006     input = cms.untracked.int32(100)
0007 )
0008 process.source = cms.Source("EmptySource")
0009 
0010 process.intdeque = cms.EDProducer("IntDequeProducer",
0011     count = cms.int32(12),
0012     ivalue = cms.int32(21)
0013 )
0014 
0015 process.intlist = cms.EDProducer("IntListProducer",
0016     count = cms.int32(4),
0017     ivalue = cms.int32(3)
0018 )
0019 
0020 process.intset = cms.EDProducer("IntSetProducer",
0021     start = cms.int32(100),
0022     stop = cms.int32(110)
0023 )
0024 
0025 process.intvec = cms.EDProducer("IntVectorProducer",
0026     count = cms.int32(9),
0027     ivalue = cms.int32(11)
0028 )
0029 
0030 process.out = cms.OutputModule("PoolOutputModule",
0031     fileName = cms.untracked.string('testEventHistory_1.root')
0032 )
0033 
0034 process.p1 = cms.Path(process.intdeque+process.intlist+process.intset+process.intvec)
0035 process.ep1 = cms.EndPath(process.out)
0036 
0037 process2 = cms.Process("SECOND")
0038 
0039 process.addSubProcess(cms.SubProcess(process2))
0040 
0041 process2.intdeque = cms.EDProducer("IntDequeProducer",
0042     count = cms.int32(12),
0043     ivalue = cms.int32(21)
0044 )
0045 
0046 process2.intlist = cms.EDProducer("IntListProducer",
0047     count = cms.int32(4),
0048     ivalue = cms.int32(3)
0049 )
0050 
0051 process2.intset = cms.EDProducer("IntSetProducer",
0052     start = cms.int32(100),
0053     stop = cms.int32(110)
0054 )
0055 
0056 process2.intvec = cms.EDProducer("IntVectorProducer",
0057     count = cms.int32(9),
0058     ivalue = cms.int32(11)
0059 )
0060 
0061 process2.filt55 = cms.EDFilter("TestFilterModule",
0062     acceptValue = cms.untracked.int32(55)
0063 )
0064 
0065 process2.filt75 = cms.EDFilter("TestFilterModule",
0066     acceptValue = cms.untracked.int32(75)
0067 )
0068 
0069 process2.out = cms.OutputModule("PoolOutputModule",
0070     SelectEvents = cms.untracked.PSet(
0071         SelectEvents = cms.vstring('f55')
0072     ),
0073     fileName = cms.untracked.string('testEventHistory_2.root')
0074 )
0075 
0076 process2.s = cms.Sequence(process2.intdeque+process2.intlist+process2.intset+process2.intvec)
0077 process2.f55 = cms.Path(process2.s*process2.filt55)
0078 process2.f75 = cms.Path(process2.s*process2.filt75)
0079 process2.ep2 = cms.EndPath(process2.out)
0080 
0081 process2.sched = cms.Schedule(process2.f55, process2.f75, process2.ep2)
0082 
0083 process3 = cms.Process("THIRD")
0084 
0085 process2.addSubProcess(cms.SubProcess(process3,
0086     SelectEvents = cms.untracked.PSet(
0087         SelectEvents = cms.vstring('f55')
0088     )
0089 ))
0090 
0091 process3.intdeque = cms.EDProducer("IntDequeProducer",
0092     count = cms.int32(12),
0093     ivalue = cms.int32(21)
0094 )
0095 
0096 process3.intlist = cms.EDProducer("IntListProducer",
0097     count = cms.int32(4),
0098     ivalue = cms.int32(3)
0099 )
0100 
0101 process3.intset = cms.EDProducer("IntSetProducer",
0102     start = cms.int32(100),
0103     stop = cms.int32(110)
0104 )
0105 
0106 process3.intvec = cms.EDProducer("IntVectorProducer",
0107     count = cms.int32(9),
0108     ivalue = cms.int32(11)
0109 )
0110 
0111 process3.out = cms.OutputModule("PoolOutputModule",
0112     fileName = cms.untracked.string('testEventHistory_3.root')
0113 )
0114 
0115 process3.outother = cms.OutputModule("PoolOutputModule",
0116     fileName = cms.untracked.string('testEventHistory_other.root')
0117 )
0118 
0119 process3.p3 = cms.Path(process3.intdeque+process3.intlist+process3.intset)
0120 process3.ep31 = cms.EndPath(process3.out)
0121 process3.ep32 = cms.EndPath(process3.intvec*process3.intset*process3.outother*process3.out*process3.outother)
0122 process3.epother = cms.EndPath(process3.outother)
0123 
0124 process4 = cms.Process("FOURTH")
0125 
0126 process3.addSubProcess(cms.SubProcess(process4))
0127 
0128 process4.out = cms.OutputModule("PoolOutputModule",
0129     fileName = cms.untracked.string('testEventHistory_4.root')
0130 )
0131 
0132 process4.ep4 = cms.EndPath(process4.out)
0133 
0134 process5 = cms.Process("FIFTH")
0135 
0136 process4.addSubProcess(cms.SubProcess(process5))
0137 
0138 process5.out = cms.OutputModule("PoolOutputModule",
0139     SelectEvents = cms.untracked.PSet(
0140     SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0141     ),
0142     fileName = cms.untracked.string('testEventHistory_5.root')
0143 )
0144 
0145 process5.ep4 = cms.EndPath(process5.out)
0146 
0147 process6 = cms.Process("SIXTH")
0148 
0149 process5.addSubProcess(cms.SubProcess(process6,
0150     SelectEvents = cms.untracked.PSet(
0151        SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0152     )
0153 ))
0154 
0155 process6.historytest = cms.EDAnalyzer("HistoryAnalyzer",
0156     # Why does the filter module (from step 3) pass 56 events, when I
0157     # give it a rate of 55%? (after 100 events are created the filter
0158     # starts counting at 1 and passes events 1 to 55 then 100 also ...)
0159     expectedCount = cms.int32(56),
0160     # this does not count the current process
0161     expectedSize = cms.int32(4),
0162     # check SelectEventInfo from previous processes
0163     expectedSelectEventsInfo = cms.VPSet(
0164       cms.PSet(
0165         EndPathPositions = cms.vint32(),
0166         EndPaths =  cms.vstring(),
0167         InProcessHistory = cms.bool(True),
0168         SelectEvents = cms.vstring()
0169       ),
0170       cms.PSet(
0171         EndPathPositions = cms.vint32(),
0172         EndPaths =  cms.vstring(),
0173         InProcessHistory = cms.bool(True),
0174         SelectEvents = cms.vstring('f55')
0175       ),
0176       cms.PSet(
0177         EndPathPositions = cms.vint32(),
0178         EndPaths =  cms.vstring(),
0179         InProcessHistory = cms.bool(True),
0180         SelectEvents = cms.vstring()
0181       ),
0182       cms.PSet(
0183         EndPathPositions = cms.vint32(),
0184         EndPaths =  cms.vstring(),
0185         InProcessHistory = cms.bool(False),
0186         SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')        
0187       )
0188     ),
0189     # check the deletion modules from the top level
0190     # ParameterSet of the current process. The following
0191     # should be deleted
0192     #    OutputModules
0193     #    EDAnalyzers not on endPaths
0194     #    if unscheduled, EDFilters and EDProducers not on paths or end paths
0195     # The module ParameterSet should be removed
0196     # The label should be removed from @all_modules and all end paths
0197     # empty end paths should be removed from @end_paths and @paths
0198     expectedPaths = cms.vstring('p1', 'p2', 'ep62'),
0199     expectedEndPaths = cms.vstring('ep62'),
0200     expectedModules = cms.vstring('analyzerOnPath', 'filterOnEndPath', 'filterOnPath', 'historytest', 'producerOnEndPath', 'producerOnPath'),
0201     expectedDroppedEndPaths = cms.vstring('ep61', 'ep63'),
0202     expectedDroppedModules = cms.vstring('dummyanalyzer', 'dummyfilter', 'dummyproducer', 'dummyout'),
0203     expectedDropFromProcPSet = cms.vstring('out', 'out2', 'analyzerOnEndPath'),
0204     expectedModulesOnEndPaths = cms.PSet(
0205       ep62 = cms.vstring('producerOnEndPath', 'filterOnEndPath', 'historytest')
0206     )
0207 )
0208 
0209 process6.producerOnPath = cms.EDProducer("IntProducer",
0210     ivalue = cms.int32(2)
0211 )
0212 
0213 process6.producerOnEndPath = cms.EDProducer("IntProducer",
0214     ivalue = cms.int32(2)
0215 )
0216 
0217 process6.filterOnPath = cms.EDFilter("TestFilterModule",
0218     acceptValue = cms.untracked.int32(55)
0219 )
0220 
0221 process6.filterOnEndPath = cms.EDFilter("TestFilterModule",
0222     acceptValue = cms.untracked.int32(55)
0223 )
0224 
0225 process6.analyzerOnPath = cms.EDAnalyzer("NonAnalyzer")
0226 
0227 process6.analyzerOnEndPath = cms.EDAnalyzer("NonAnalyzer")
0228 
0229 process6.dummyanalyzer = cms.EDAnalyzer("NonAnalyzer")
0230 
0231 process6.dummyproducer = cms.EDProducer("IntProducer",
0232     ivalue = cms.int32(2)
0233 )
0234 
0235 process6.dummyfilter = cms.EDFilter("TestFilterModule",
0236     acceptValue = cms.untracked.int32(55)
0237 )
0238 
0239 process6.dummyout = cms.OutputModule("PoolOutputModule",
0240     fileName = cms.untracked.string('dummy_6.root')
0241 )
0242 
0243 process6.out = cms.OutputModule("PoolOutputModule",
0244     SelectEvents = cms.untracked.PSet(
0245       SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0246     ),
0247     fileName = cms.untracked.string('testEventHistory_6.root')
0248 )
0249 
0250 process6.out2 = cms.OutputModule("PoolOutputModule",
0251     SelectEvents = cms.untracked.PSet(
0252       SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0253     ),
0254     fileName = cms.untracked.string('testEventHistory_62.root')
0255 )
0256 
0257 process6.p1 = cms.Path(process6.historytest*process6.filterOnPath*process6.producerOnPath)
0258 process6.p2 = cms.Path(process6.historytest*process6.analyzerOnPath)
0259 
0260 process6.ep61 = cms.EndPath(process6.out)
0261 process6.ep62 = cms.EndPath(process6.producerOnEndPath*process6.filterOnEndPath*process6.out*process6.historytest)
0262 process6.ep63 = cms.EndPath(process6.analyzerOnEndPath*process6.out2*process6.out)
0263 
0264 process7 = cms.Process("SEVENTH")
0265 
0266 process6.addSubProcess(cms.SubProcess(process7))
0267 
0268 process7.dummyproducerxxx = cms.EDProducer("IntProducer",
0269     ivalue = cms.int32(2)
0270 )
0271 
0272 process7.p1 = cms.Path(process7.dummyproducerxxx)