Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TEST")
0004 
0005 process.options = cms.untracked.PSet(
0006     numberOfStreams = cms.untracked.uint32(1),
0007     numberOfThreads = cms.untracked.uint32(1),
0008     numberOfConcurrentRuns = cms.untracked.uint32(1),
0009     numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(1)
0010 )
0011 
0012 process.source = cms.Source("PoolSource",
0013     fileNames = cms.untracked.vstring(
0014         'file:testProcessBlockMergeOfMergedFiles.root'
0015     )
0016 )
0017 
0018 process.intProducerBeginProcessBlockT = cms.EDProducer("IntProducerBeginProcessBlock", ivalue = cms.int32(4000))
0019 
0020 process.intProducerEndProcessBlockT = cms.EDProducer("IntProducerEndProcessBlock", ivalue = cms.int32(40000))
0021 
0022 process.out = cms.OutputModule("PoolOutputModule",
0023     fileName = cms.untracked.string('testProcessBlockSubProcessTest.root'),
0024     outputCommands = cms.untracked.vstring(
0025         "keep *",
0026         "drop *_*_beginProcessBlock_*",
0027         "drop *_*_endProcessBlock_*"
0028     )
0029 )
0030 
0031 process.testOneOutput = cms.OutputModule("TestOneOutput",
0032     verbose = cms.untracked.bool(False),
0033     expectedProcessesWithProcessBlockProducts = cms.untracked.vstring('PROD1', 'MERGE', 'MERGEOFMERGED', 'TEST'),
0034     expectedWriteProcessBlockTransitions = cms.untracked.int32(8),
0035     outputCommands = cms.untracked.vstring(
0036         "keep *",
0037         "drop *_*_beginProcessBlock_*",
0038         "drop *_*_endProcessBlock_*"
0039     )
0040 )
0041 
0042 process.eventIntProducer = cms.EDProducer("IntProducer", ivalue = cms.int32(1))
0043 
0044 process.transientIntProducerEndProcessBlock = cms.EDProducer("TransientIntProducerEndProcessBlock",
0045     ivalue = cms.int32(90)
0046 )
0047 
0048 process.nonEventIntProducer = cms.EDProducer("NonEventIntProducer",
0049     ivalue = cms.int32(1)
0050 )
0051 
0052 process.p = cms.Path(
0053     process.eventIntProducer *
0054     process.transientIntProducerEndProcessBlock *
0055     process.nonEventIntProducer *
0056     process.intProducerBeginProcessBlockT *
0057     process.intProducerEndProcessBlockT
0058 )
0059 
0060 process.e = cms.EndPath(
0061     process.out *
0062     process.testOneOutput
0063 )
0064 
0065 readProcess = cms.Process("READ")
0066 process.addSubProcess(cms.SubProcess(readProcess,
0067     outputCommands = cms.untracked.vstring(
0068         "keep *"
0069     )
0070 ))
0071 
0072 readProcess.intProducerBeginProcessBlockR = cms.EDProducer("IntProducerBeginProcessBlock", ivalue = cms.int32(5000))
0073 
0074 readProcess.intProducerEndProcessBlockR = cms.EDProducer("IntProducerEndProcessBlock", ivalue = cms.int32(50000))
0075 
0076 readProcess.out = cms.OutputModule("PoolOutputModule",
0077     fileName = cms.untracked.string('testProcessBlockSubProcessRead.root'),
0078     outputCommands = cms.untracked.vstring(
0079         "keep *",
0080         "drop *_*_beginProcessBlock_*",
0081         "drop *_*_endProcessBlock_*"
0082     )
0083 )
0084 
0085 readProcess.testOneOutput = cms.OutputModule("TestOneOutput",
0086     verbose = cms.untracked.bool(False),
0087     expectedProcessesWithProcessBlockProducts = cms.untracked.vstring('PROD1', 'MERGE', 'MERGEOFMERGED', 'TEST',  'READ'),
0088     expectedWriteProcessBlockTransitions = cms.untracked.int32(9),
0089     outputCommands = cms.untracked.vstring(
0090         "keep *",
0091         "drop *_*_beginProcessBlock_*",
0092         "drop *_*_endProcessBlock_*"
0093     )
0094 )
0095 
0096 readProcess.p = cms.Path(
0097     readProcess.intProducerBeginProcessBlockR *
0098     readProcess.intProducerEndProcessBlockR
0099 )
0100 
0101 readProcess.e = cms.EndPath(
0102     readProcess.out *
0103     readProcess.testOneOutput
0104 )
0105 
0106 readAgainProcess = cms.Process("READAGAIN")
0107 readProcess.addSubProcess(cms.SubProcess(readAgainProcess,
0108     outputCommands = cms.untracked.vstring(
0109         "keep *"
0110     )
0111 ))
0112 
0113 # transitions = 12 events + 9 access input ProcessBlock transitions + 12 fill cache functor calls
0114 # sum = 11 + 22 + 3300 + 4400 + 44 + 444
0115 readAgainProcess.readProcessBlocksOneAnalyzer1 = cms.EDAnalyzer("edmtest::one::InputProcessBlockIntAnalyzer",
0116                                             transitions = cms.int32(33),
0117                                             consumesBeginProcessBlock = cms.InputTag("intProducerBeginProcessBlock", ""),
0118                                             consumesEndProcessBlock = cms.InputTag("intProducerEndProcessBlock", ""),
0119                                             consumesBeginProcessBlockM = cms.InputTag("intProducerBeginProcessBlockM", ""),
0120                                             consumesEndProcessBlockM = cms.InputTag("intProducerEndProcessBlockM", ""),
0121                                             expectedByRun = cms.vint32(11, 22, 3300, 4400),
0122                                             expectedSum = cms.int32(8221)
0123 )
0124 
0125 # transitions = 12 events + 9 access input ProcessBlock transitions + 6 fill cache functor calls
0126 # sum = 44 + 444
0127 readAgainProcess.readProcessBlocksOneAnalyzer2 = cms.EDAnalyzer("edmtest::one::InputProcessBlockIntAnalyzer",
0128                                             transitions = cms.int32(27),
0129                                             consumesBeginProcessBlock = cms.InputTag("intProducerBeginProcessBlockM", ""),
0130                                             consumesEndProcessBlock = cms.InputTag("intProducerEndProcessBlockM", ""),
0131                                             consumesBeginProcessBlockM = cms.InputTag("intProducerBeginProcessBlockM", ""),
0132                                             consumesEndProcessBlockM = cms.InputTag("intProducerEndProcessBlockM", ""),
0133                                             expectedByRun = cms.vint32(44, 44, 444, 444),
0134                                             expectedSum = cms.int32(488)
0135 )
0136 
0137 # transitions = 12 events + 9 access input ProcessBlock transitions + 3 fill cache functor calls
0138 # sum = 44 + 444
0139 readAgainProcess.readProcessBlocksOneAnalyzer3 = cms.EDAnalyzer("edmtest::one::InputProcessBlockIntAnalyzer",
0140                                             transitions = cms.int32(24),
0141                                             consumesBeginProcessBlock = cms.InputTag("intProducerBeginProcessBlockMM", ""),
0142                                             consumesEndProcessBlock = cms.InputTag("intProducerEndProcessBlockMM", ""),
0143                                             consumesBeginProcessBlockM = cms.InputTag("intProducerBeginProcessBlockM", ""),
0144                                             consumesEndProcessBlockM = cms.InputTag("intProducerEndProcessBlockM", ""),
0145                                             expectedByRun = cms.vint32(644, 644, 644, 644),
0146                                             expectedSum = cms.int32(488)
0147 )
0148 
0149 # transitions = 12 events + 9 access input ProcessBlock transitions + 3 fill cache functor calls
0150 # sum = 44 + 444
0151 # filler sum = 3 x 44000
0152 readAgainProcess.readProcessBlocksOneAnalyzer4 = cms.EDAnalyzer("edmtest::one::InputProcessBlockIntAnalyzer",
0153                                             transitions = cms.int32(24),
0154                                             consumesBeginProcessBlock = cms.InputTag("intProducerBeginProcessBlockT", ""),
0155                                             consumesEndProcessBlock = cms.InputTag("intProducerEndProcessBlockT", ""),
0156                                             consumesBeginProcessBlockM = cms.InputTag("intProducerBeginProcessBlockM", ""),
0157                                             consumesEndProcessBlockM = cms.InputTag("intProducerEndProcessBlockM", ""),
0158                                             # The expectedByRun test cannot work because the data is from an earlier SubProcess
0159                                             expectedByRun = cms.vint32(),
0160                                             expectedFillerSum = cms.untracked.int32(132000),
0161                                             expectedSum = cms.int32(488)
0162 )
0163 
0164 # transitions = 12 events + 9 access input ProcessBlock transitions + 3 fill cache functor calls
0165 # sum = 44 + 444
0166 # filler sum = 3 x 55000
0167 readAgainProcess.readProcessBlocksOneAnalyzer5 = cms.EDAnalyzer("edmtest::one::InputProcessBlockIntAnalyzer",
0168                                             transitions = cms.int32(24),
0169                                             consumesBeginProcessBlock = cms.InputTag("intProducerBeginProcessBlockR", ""),
0170                                             consumesEndProcessBlock = cms.InputTag("intProducerEndProcessBlockR", ""),
0171                                             consumesBeginProcessBlockM = cms.InputTag("intProducerBeginProcessBlockM", ""),
0172                                             consumesEndProcessBlockM = cms.InputTag("intProducerEndProcessBlockM", ""),
0173                                             # The expectedByRun test cannot work because the data is from an earlier SubProcess
0174                                             expectedByRun = cms.vint32(),
0175                                             expectedFillerSum = cms.untracked.int32(165000),
0176                                             expectedSum = cms.int32(488),
0177                                             consumesBeginProcessBlockNotFound = cms.InputTag("intProducerBeginProcessBlockT"),
0178                                             consumesEndProcessBlockNotFound = cms.InputTag("intProducerEndProcessBlockT")
0179 )
0180 
0181 readAgainProcess.intProducerBeginProcessBlockRA = cms.EDProducer("IntProducerBeginProcessBlock", ivalue = cms.int32(100000))
0182 
0183 readAgainProcess.intProducerEndProcessBlockRA = cms.EDProducer("IntProducerEndProcessBlock", ivalue = cms.int32(1000000))
0184 
0185 readAgainProcess.out = cms.OutputModule("PoolOutputModule",
0186     fileName = cms.untracked.string('testProcessBlockSubProcessReadAgain.root'),
0187     outputCommands = cms.untracked.vstring(
0188         "keep *",
0189         "drop *_*_beginProcessBlock_*",
0190         "drop *_*_endProcessBlock_*"
0191     )
0192 )
0193 
0194 readAgainProcess.testOneOutput = cms.OutputModule("TestOneOutput",
0195     verbose = cms.untracked.bool(False),
0196     expectedProcessesWithProcessBlockProducts = cms.untracked.vstring('PROD1', 'MERGE', 'MERGEOFMERGED', 'TEST',  'READ', 'READAGAIN'),
0197     expectedTopProcessesWithProcessBlockProducts = cms.untracked.vstring('PROD1', 'MERGE', 'MERGEOFMERGED', 'TEST'),
0198     expectedProcessesInFirstFile = cms.untracked.uint32(3),
0199     expectedAddedProcesses = cms.untracked.vstring('TEST',  'READ', 'READAGAIN'),
0200     expectedTopAddedProcesses = cms.untracked.vstring('TEST'),
0201     expectedTopCacheIndices0 = cms.untracked.vuint32(0, 4, 6, 1, 4, 6, 2, 5, 6, 3, 5, 6),
0202     expectedWriteProcessBlockTransitions = cms.untracked.int32(10),
0203     expectedNEntries0 = cms.untracked.vuint32(4, 2, 1),
0204     expectedCacheIndexVectorsPerFile = cms.untracked.vuint32(4),
0205     expectedCacheEntriesPerFile0 =  cms.untracked.vuint32(7),
0206     expectedOuterOffset = cms.untracked.vuint32(0),
0207     outputCommands = cms.untracked.vstring(
0208         "keep *",
0209         "drop *_*_beginProcessBlock_*",
0210         "drop *_*_endProcessBlock_*"
0211     )
0212 )
0213 
0214 readAgainProcess.p = cms.Path(
0215     readAgainProcess.intProducerBeginProcessBlockRA *
0216     readAgainProcess.intProducerEndProcessBlockRA *
0217     readAgainProcess.readProcessBlocksOneAnalyzer1 *
0218     readAgainProcess.readProcessBlocksOneAnalyzer2 *
0219     readAgainProcess.readProcessBlocksOneAnalyzer3 *
0220     readAgainProcess.readProcessBlocksOneAnalyzer4 *
0221     readAgainProcess.readProcessBlocksOneAnalyzer5
0222 )
0223 
0224 readAgainProcess.e = cms.EndPath(
0225     readAgainProcess.out *
0226     readAgainProcess.testOneOutput
0227 )