Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("SIXTH")
0004 
0005 process.source = cms.Source("PoolSource",
0006     fileNames = cms.untracked.vstring('file:testEventHistory_5.root')
0007 )
0008 
0009 process.historytest = cms.EDAnalyzer("HistoryAnalyzer",
0010     # Why does the filter module (from step 3) pass 56 events, when I
0011     # give it a rate of 55%? (after 100 events are created the filter
0012     # starts counting at 1 and passes events 1 to 55 then 100 also ...)
0013     expectedCount = cms.int32(56),
0014     # this does not count the current process
0015     expectedSize = cms.int32(4),
0016     # check SelectEventInfo from previous processes
0017     expectedSelectEventsInfo = cms.VPSet(
0018       cms.PSet(
0019         EndPathPositions = cms.vint32(0),
0020         EndPaths =  cms.vstring('ep1'),
0021         InProcessHistory = cms.bool(True),
0022         SelectEvents = cms.vstring()
0023       ),
0024       cms.PSet(
0025         EndPathPositions = cms.vint32(0),
0026         EndPaths =  cms.vstring('ep2'),
0027         InProcessHistory = cms.bool(True),
0028         SelectEvents = cms.vstring('f55')
0029       ),
0030       cms.PSet(
0031         EndPathPositions = cms.vint32(0, 2),
0032         EndPaths =  cms.vstring('ep31', 'ep32'),
0033         InProcessHistory = cms.bool(True),
0034         SelectEvents = cms.vstring()
0035       ),
0036       cms.PSet(
0037         EndPathPositions = cms.vint32(0),
0038         EndPaths =  cms.vstring('ep4'),
0039         InProcessHistory = cms.bool(False),
0040         SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')        
0041       )
0042     ),
0043     # check the deletion modules from the top level
0044     # ParameterSet of the current process. The following
0045     # should be deleted
0046     #    OutputModules
0047     #    EDAnalyzers not on endPaths
0048     #    if unscheduled, EDFilters and EDProducers not on paths or end paths
0049     # The module ParameterSet should be removed
0050     # The label should be removed from @all_modules and all end paths
0051     # empty end paths should be removed from @end_paths and @paths
0052     expectedPaths = cms.vstring('p1', 'p2', 'ep62'),
0053     expectedEndPaths = cms.vstring('ep62'),
0054     expectedModules = cms.vstring('analyzerOnPath', 'filterOnEndPath', 'filterOnPath', 'historytest', 'producerOnEndPath', 'producerOnPath'),
0055     expectedDroppedEndPaths = cms.vstring('ep61', 'ep63'),
0056     expectedDroppedModules = cms.vstring('dummyanalyzer', 'dummyfilter', 'dummyproducer', 'dummyout'),
0057     expectedDropFromProcPSet = cms.vstring('out', 'out2', 'analyzerOnEndPath'),
0058     expectedModulesOnEndPaths = cms.PSet(
0059       ep62 = cms.vstring('producerOnEndPath', 'filterOnEndPath', 'historytest')
0060     )
0061 )
0062 
0063 process.producerOnPath = cms.EDProducer("IntProducer",
0064     ivalue = cms.int32(2)
0065 )
0066 
0067 process.producerOnEndPath = cms.EDProducer("IntProducer",
0068     ivalue = cms.int32(2)
0069 )
0070 
0071 process.filterOnPath = cms.EDFilter("TestFilterModule",
0072     acceptValue = cms.untracked.int32(55)
0073 )
0074 
0075 process.filterOnEndPath = cms.EDFilter("TestFilterModule",
0076     acceptValue = cms.untracked.int32(55)
0077 )
0078 
0079 process.analyzerOnPath = cms.EDAnalyzer("NonAnalyzer")
0080 
0081 process.analyzerOnEndPath = cms.EDAnalyzer("NonAnalyzer")
0082 
0083 process.dummyanalyzer = cms.EDAnalyzer("NonAnalyzer")
0084 
0085 process.dummyproducer = cms.EDProducer("IntProducer",
0086     ivalue = cms.int32(2)
0087 )
0088 
0089 process.dummyfilter = cms.EDFilter("TestFilterModule",
0090     acceptValue = cms.untracked.int32(55)
0091 )
0092 
0093 process.dummyout = cms.OutputModule("PoolOutputModule",
0094     fileName = cms.untracked.string('dummy_6.root')
0095 )
0096 
0097 process.out = cms.OutputModule("PoolOutputModule",
0098     SelectEvents = cms.untracked.PSet(
0099       SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0100     ),
0101     fileName = cms.untracked.string('testEventHistory_6.root')
0102 )
0103 
0104 process.out2 = cms.OutputModule("PoolOutputModule",
0105     SelectEvents = cms.untracked.PSet(
0106       SelectEvents = cms.vstring('f55:SECOND','f75:SECOND')
0107     ),
0108     fileName = cms.untracked.string('testEventHistory_62.root')
0109 )
0110 
0111 process.p1 = cms.Path(process.historytest*process.filterOnPath*process.producerOnPath)
0112 process.p2 = cms.Path(process.historytest*process.analyzerOnPath)
0113 
0114 process.ep61 = cms.EndPath(process.out)
0115 process.ep62 = cms.EndPath(process.producerOnEndPath*process.filterOnEndPath*process.out*process.historytest)
0116 process.ep63 = cms.EndPath(process.analyzerOnEndPath*process.out2*process.out)