Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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(1)
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(26),
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 process.makeThingToBeDropped2 = cms.EDProducer("ThingWithMergeProducer")
0041 
0042 process.aliasForThingToBeDropped2 = cms.EDAlias(
0043     makeThingToBeDropped2  = cms.VPSet(
0044       cms.PSet(type = cms.string('edmtestThing'),
0045                fromProductInstance = cms.string('event'),
0046                toProductInstance = cms.string('instance2')),
0047       cms.PSet(type = cms.string('edmtestThing'),
0048                fromProductInstance = cms.string('endLumi'),
0049                toProductInstance = cms.string('endLumi2')),
0050       cms.PSet(type = cms.string('edmtestThing'),
0051                fromProductInstance = cms.string('endRun'),
0052                toProductInstance = cms.string('endRun2'))
0053     )
0054 )
0055 
0056 # This product will be produced in configuration PROD1 and PROD5
0057 # In PROD2 it will be produced and dropped and there will be another
0058 # product whose provenance includes it as a parent. In PROD3 it will
0059 # be produced and dropped and there will not be a product that includes
0060 # it as a parent. In PROD4 it will never be produced at all.
0061 process.makeThingToBeDropped1 = cms.EDProducer("ThingWithMergeProducer")
0062 process.dependsOnThingToBeDropped1 = cms.EDProducer("ThingWithMergeProducer",
0063     labelsToGet = cms.untracked.vstring('makeThingToBeDropped1')
0064 )
0065 
0066 process.test = cms.EDAnalyzer("TestMergeResults",
0067 
0068     verbose = cms.untracked.bool(False),
0069 
0070     expectedParents = cms.untracked.vstring('m1'),
0071     testAlias = cms.untracked.bool(True)
0072 )
0073 
0074 process.A = cms.EDProducer("ThingWithMergeProducer")
0075 
0076 process.B = cms.EDProducer("ThingWithMergeProducer",
0077     labelsToGet = cms.untracked.vstring('A')
0078 )
0079 
0080 process.C = cms.EDProducer("ThingWithMergeProducer",
0081     labelsToGet = cms.untracked.vstring('A')
0082 )
0083 
0084 process.D = cms.EDProducer("ThingWithMergeProducer",
0085     labelsToGet = cms.untracked.vstring('B')
0086 )
0087 
0088 process.E = cms.EDProducer("ThingWithMergeProducer",
0089     labelsToGet = cms.untracked.vstring('B', 'C')
0090 )
0091 
0092 process.F = cms.EDProducer("ThingWithMergeProducer",
0093     labelsToGet = cms.untracked.vstring('C')
0094 )
0095 
0096 process.G = cms.EDProducer("ThingWithMergeProducer",
0097     labelsToGet = cms.untracked.vstring('A')
0098 )
0099 
0100 process.H = cms.EDProducer("ThingWithMergeProducer",
0101     labelsToGet = cms.untracked.vstring('G')
0102 )
0103 
0104 process.I = cms.EDProducer("ThingWithMergeProducer",
0105     labelsToGet = cms.untracked.vstring('A')
0106 )
0107 
0108 process.J = cms.EDProducer("ThingWithMergeProducer",
0109     labelsToGet = cms.untracked.vstring('I')
0110 )
0111 
0112 process.K = cms.EDProducer("ThingWithMergeProducer",
0113     labelsToGet = cms.untracked.vstring('I')
0114 )
0115 
0116 process.L = cms.EDProducer("ThingWithMergeProducer",
0117     labelsToGet = cms.untracked.vstring('F')
0118 )
0119 
0120 process.out = cms.OutputModule("PoolOutputModule",
0121     fileName = cms.untracked.string('testRunMerge7.root'),
0122     outputCommands = cms.untracked.vstring(
0123         'keep *', 
0124         'drop *_makeThingToBeDropped2_*_*'
0125     )
0126 )
0127 
0128 process.p1 = cms.Path((process.m1 + process.m2 + process.m3) *
0129                      process.thingWithMergeProducer *
0130                      process.makeThingToBeDropped2 *
0131                      process.test *
0132                      process.tryNoPut *
0133                      process.makeThingToBeDropped *
0134                      process.makeThingToBeDropped1 *
0135                      process.dependsOnThingToBeDropped1)
0136 
0137 process.p2 = cms.Path(process.A *
0138                       process.B *
0139                       process.C *
0140                       process.D *
0141                       process.E *
0142                       process.F *
0143                       process.G *
0144                       process.H *
0145                       process.I *
0146                       process.J *
0147                       process.K *
0148                       process.L)
0149 
0150 process.e = cms.EndPath(process.out)