Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("PROD")
0004 
0005 process.load("FWCore.MessageService.MessageLogger_cfi")
0006 process.MessageLogger.cerr.FwkReport.reportEvery = 1000
0007 
0008 import FWCore.Framework.test.cmsExceptionsFatal_cff
0009 process.options = FWCore.Framework.test.cmsExceptionsFatal_cff.options
0010 
0011 process.maxEvents = cms.untracked.PSet(
0012     input = cms.untracked.int32(10)
0013 )
0014 
0015 process.source = cms.Source("EmptySource",
0016     firstLuminosityBlock = cms.untracked.uint32(1),
0017     numberEventsInLuminosityBlock = cms.untracked.uint32(100),
0018     firstEvent = cms.untracked.uint32(11),
0019     firstRun = cms.untracked.uint32(1),
0020     numberEventsInRun = cms.untracked.uint32(100)
0021 )
0022 
0023 process.thingWithMergeProducer = cms.EDProducer("ThingWithMergeProducer",
0024     labelsToGet = cms.untracked.vstring('m1')
0025 )
0026 
0027 # These are here only for tests of parentage merging
0028 process.m1 = cms.EDProducer("ThingWithMergeProducer")
0029 process.m2 = cms.EDProducer("ThingWithMergeProducer")
0030 process.m3 = cms.EDProducer("ThingWithMergeProducer")
0031 
0032 process.tryNoPut = cms.EDProducer("ThingWithMergeProducer",
0033     noPut = cms.untracked.bool(True)
0034 )
0035 
0036 # This one tests products dropped and then restored by secondary file
0037 # input
0038 process.makeThingToBeDropped = cms.EDProducer("ThingWithMergeProducer")
0039 
0040 # This product will be produced in configuration PROD1 and PROD5
0041 # In PROD2 it will be produced and dropped and there will be another
0042 # product whose provenance includes it as a parent. In PROD3 it will
0043 # be produced and dropped and there will not be a product that includes
0044 # it as a parent. In PROD4 it will never be produced at all.
0045 process.makeThingToBeDropped1 = cms.EDProducer("ThingWithMergeProducer")
0046 process.dependsOnThingToBeDropped1 = cms.EDProducer("ThingWithMergeProducer",
0047     labelsToGet = cms.untracked.vstring('makeThingToBeDropped1')
0048 )
0049 
0050 process.test = cms.EDAnalyzer("TestMergeResults",
0051 
0052     verbose = cms.untracked.bool(False),
0053 
0054     expectedParents = cms.untracked.vstring(
0055         'm1', 'm1', 'm1', 'm1', 'm1',
0056         'm1', 'm1', 'm1', 'm1', 'm1')
0057 )
0058 
0059 process.A = cms.EDProducer("ThingWithMergeProducer")
0060 
0061 process.B = cms.EDProducer("ThingWithMergeProducer",
0062     labelsToGet = cms.untracked.vstring('A')
0063 )
0064 
0065 process.C = cms.EDProducer("ThingWithMergeProducer",
0066     labelsToGet = cms.untracked.vstring('A')
0067 )
0068 
0069 process.D = cms.EDProducer("ThingWithMergeProducer",
0070     labelsToGet = cms.untracked.vstring('B')
0071 )
0072 
0073 process.E = cms.EDProducer("ThingWithMergeProducer",
0074     labelsToGet = cms.untracked.vstring('B', 'C')
0075 )
0076 
0077 process.F = cms.EDProducer("ThingWithMergeProducer",
0078     labelsToGet = cms.untracked.vstring('C')
0079 )
0080 
0081 process.G = cms.EDProducer("ThingWithMergeProducer",
0082     labelsToGet = cms.untracked.vstring('A')
0083 )
0084 
0085 process.H = cms.EDProducer("ThingWithMergeProducer",
0086     labelsToGet = cms.untracked.vstring('G')
0087 )
0088 
0089 process.I = cms.EDProducer("ThingWithMergeProducer",
0090     labelsToGet = cms.untracked.vstring('A')
0091 )
0092 
0093 process.J = cms.EDProducer("ThingWithMergeProducer",
0094     labelsToGet = cms.untracked.vstring('I')
0095 )
0096 
0097 process.K = cms.EDProducer("ThingWithMergeProducer",
0098     labelsToGet = cms.untracked.vstring('I')
0099 )
0100 
0101 process.L = cms.EDProducer("ThingWithMergeProducer",
0102     labelsToGet = cms.untracked.vstring('F')
0103 )
0104 
0105 process.testGetterOfProducts = cms.EDFilter("TestGetterOfProducts",
0106     processName = cms.string('PROD'),
0107     expectedInputTagLabels = cms.vstring('A','B','C','D','E','F',
0108                                          'G', 'H', 'I', 'J', 'K', 'L',
0109                                         'dependsOnThingToBeDropped1',
0110                                         'm1', 'm2', 'm3',
0111                                         'makeThingToBeDropped',
0112                                         'makeThingToBeDropped1',
0113                                         'thingWithMergeProducer',
0114                                         'tryNoPut' ),
0115     expectedLabelsAfterGet = cms.vstring('A','B','C','D','E','F',
0116                                          'G', 'H', 'I', 'J', 'K', 'L',
0117                                          'dependsOnThingToBeDropped1',
0118                                          'm1', 'm2', 'm3',
0119                                          'makeThingToBeDropped',
0120                                          'makeThingToBeDropped1',
0121                                          'thingWithMergeProducer'
0122                                          
0123     )
0124 )
0125 
0126 process.testGetterOfProductsA = cms.EDAnalyzer("TestGetterOfProductsA",
0127     processName = cms.string('PROD'),
0128     branchType = cms.int32(0),
0129     expectedInputTagLabels = cms.vstring('A','B','C','D','E','F',
0130                                          'G', 'H', 'I', 'J', 'K', 'L',
0131                                         'dependsOnThingToBeDropped1',
0132                                         'm1', 'm2', 'm3',
0133                                         'makeThingToBeDropped',
0134                                         'makeThingToBeDropped1',
0135                                         'thingWithMergeProducer',
0136                                         'tryNoPut'
0137     ),
0138     expectedLabelsAfterGet = cms.vstring('A','B','C','D','E','F',
0139                                          'G', 'H', 'I', 'J', 'K', 'L',
0140                                          'dependsOnThingToBeDropped1',
0141                                          'm1', 'm2', 'm3',
0142                                          'makeThingToBeDropped',
0143                                          'makeThingToBeDropped1',
0144                                          'thingWithMergeProducer'
0145     ),
0146     expectedNumberOfThingsWithLabelA = cms.uint32(1)
0147 )
0148 
0149 process.testGetterOfProductsARun = cms.EDAnalyzer("TestGetterOfProductsA",
0150     processName = cms.string('PROD'),
0151     branchType = cms.int32(2),
0152     expectedInputTagLabels = cms.vstring('A','A','B','B','C','C','D','D','E','E','F','F',
0153                                          'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L',
0154                                         'dependsOnThingToBeDropped1','dependsOnThingToBeDropped1',
0155                                         'm1', 'm1', 'm2', 'm2', 'm3','m3',
0156                                         'makeThingToBeDropped','makeThingToBeDropped',
0157                                         'makeThingToBeDropped1','makeThingToBeDropped1',
0158                                         'thingWithMergeProducer','thingWithMergeProducer',
0159                                         'tryNoPut','tryNoPut'
0160     ),
0161     expectedLabelsAfterGet = cms.vstring('A','A','B','B','C','C','D','D','E','E','F','F',
0162                                          'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L',
0163                                          'dependsOnThingToBeDropped1', 'dependsOnThingToBeDropped1',
0164                                          'm1', 'm1', 'm2', 'm2', 'm3', 'm3',
0165                                          'makeThingToBeDropped', 'makeThingToBeDropped',
0166                                          'makeThingToBeDropped1', 'makeThingToBeDropped1',
0167                                          'thingWithMergeProducer', 'thingWithMergeProducer'
0168     ),
0169     expectedNumberOfThingsWithLabelA = cms.uint32(2)
0170 )
0171 
0172 process.testGetterOfProductsALumi = cms.EDAnalyzer("TestGetterOfProductsA",
0173     processName = cms.string('PROD'),
0174     branchType = cms.int32(1),
0175     expectedInputTagLabels = cms.vstring('A','A','B','B','C','C','D','D','E','E','F','F',
0176                                          'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L',
0177                                         'dependsOnThingToBeDropped1','dependsOnThingToBeDropped1',
0178                                         'm1', 'm1', 'm2', 'm2', 'm3','m3',
0179                                         'makeThingToBeDropped','makeThingToBeDropped',
0180                                         'makeThingToBeDropped1','makeThingToBeDropped1',
0181                                         'thingWithMergeProducer','thingWithMergeProducer',
0182                                         'tryNoPut','tryNoPut'
0183     ),
0184     expectedLabelsAfterGet = cms.vstring('A','A','B','B','C','C','D','D','E','E','F','F',
0185                                          'G', 'G', 'H', 'H', 'I', 'I', 'J', 'J', 'K', 'K', 'L', 'L',
0186                                          'dependsOnThingToBeDropped1', 'dependsOnThingToBeDropped1',
0187                                          'm1', 'm1', 'm2', 'm2', 'm3', 'm3',
0188                                          'makeThingToBeDropped', 'makeThingToBeDropped',
0189                                          'makeThingToBeDropped1', 'makeThingToBeDropped1',
0190                                          'thingWithMergeProducer', 'thingWithMergeProducer'
0191     ),
0192     expectedNumberOfThingsWithLabelA = cms.uint32(2)
0193 )
0194 
0195 process.out = cms.OutputModule("PoolOutputModule",
0196     fileName = cms.untracked.string('testRunMerge11.root')
0197 )
0198 
0199 process.p1 = cms.Path((process.m1 + process.m2 + process.m3) *
0200                      process.thingWithMergeProducer *
0201                      process.test *
0202                      process.tryNoPut *
0203                      process.makeThingToBeDropped *
0204                      process.makeThingToBeDropped1 *
0205                      process.dependsOnThingToBeDropped1)
0206 
0207 process.p2 = cms.Path(process.A *
0208                       process.B *
0209                       process.C *
0210                       process.D *
0211                       process.E *
0212                       process.F *
0213                       process.G *
0214                       process.H *
0215                       process.I *
0216                       process.J *
0217                       process.K *
0218                       process.L *
0219                       process.testGetterOfProducts *
0220                       process.testGetterOfProductsA *
0221                       process.testGetterOfProductsARun *
0222                       process.testGetterOfProductsALumi 
0223 )
0224 
0225 process.e = cms.EndPath(process.out)