Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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 )
0008 
0009 process.maxEvents = cms.untracked.PSet(
0010     input = cms.untracked.int32(3)
0011 )
0012 
0013 process.source = cms.Source("PoolSource",
0014   fileNames = cms.untracked.vstring('file:testThinningTest1.root')
0015 )
0016 
0017 process.WhatsItESProducer = cms.ESProducer("WhatsItESProducer")
0018 
0019 process.DoodadESSource = cms.ESSource("DoodadESSource")
0020 
0021 # Produce some products that have the same branch name except process
0022 # These test disambiguation when there are multiple entries
0023 # in the ThinnedAssociationsHelper with the same parent BranchID.
0024 process.thingProducer = cms.EDProducer("ThingProducer",
0025                                        offsetDelta = cms.int32(2000),
0026                                        nThings = cms.int32(50)
0027 )
0028 
0029 process.thinningThingProducerD = cms.EDProducer("ThinningThingProducer",
0030     inputTag = cms.InputTag('thingProducer'),
0031     trackTag = cms.InputTag('trackOfThingsProducerD'),
0032     offsetToThinnedKey = cms.uint32(0),
0033     expectedCollectionSize = cms.uint32(50)
0034 )
0035 
0036 process.thinningThingProducerETEST = cms.EDProducer("ThinningThingProducer",
0037     inputTag = cms.InputTag('thinningThingProducerD'),
0038     trackTag = cms.InputTag('trackOfThingsProducerE'),
0039     offsetToThinnedKey = cms.uint32(10),
0040     expectedCollectionSize = cms.uint32(9)
0041 )
0042 
0043 process.thinningThingProducerFTEST = cms.EDProducer("ThinningThingProducer",
0044     inputTag = cms.InputTag('thinningThingProducerD'),
0045     trackTag = cms.InputTag('trackOfThingsProducerF'),
0046     offsetToThinnedKey = cms.uint32(10),
0047     expectedCollectionSize = cms.uint32(9)
0048 )
0049 
0050 process.thinningThingProducerD2 = cms.EDProducer("ThinningThingProducer",
0051     inputTag = cms.InputTag('thingProducer2alias'),
0052     trackTag = cms.InputTag('trackOfThingsProducerD2'),
0053     offsetToThinnedKey = cms.uint32(0),
0054     expectedCollectionSize = cms.uint32(50)
0055 )
0056 
0057 process.thinningThingProducerD2alias = cms.EDAlias(
0058   thinningThingProducerD2 = cms.VPSet(
0059     cms.PSet(type = cms.string('edmtestThings'))
0060   )
0061 )
0062 
0063 process.testA = cms.EDAnalyzer("ThinningTestAnalyzer",
0064     parentTag = cms.InputTag('thingProducer', '', 'PROD'),
0065     thinnedTag = cms.InputTag('thinningThingProducerA'),
0066     associationTag = cms.InputTag('thinningThingProducerA'),
0067     trackTag = cms.InputTag('trackOfThingsProducerA'),
0068     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
0069                                        10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
0070                                        20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
0071                                        30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
0072                                        40, 41, 42, 43, 44, 45, 46, 47, 48, 49
0073     ),
0074     expectedThinnedContent = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0075     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0076     expectedValues = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8)
0077 )
0078 
0079 process.testB = cms.EDAnalyzer("ThinningTestAnalyzer",
0080     parentTag = cms.InputTag('thinningThingProducerA'),
0081     thinnedTag = cms.InputTag('thinningThingProducerB'),
0082     associationTag = cms.InputTag('thinningThingProducerB'),
0083     trackTag = cms.InputTag('trackOfThingsProducerB'),
0084     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8),
0085     expectedThinnedContent = cms.vint32(0, 1, 2, 3),
0086     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3),
0087     expectedValues = cms.vint32(0, 1, 2, 3)
0088 )
0089 
0090 process.testC = cms.EDAnalyzer("ThinningTestAnalyzer",
0091     parentTag = cms.InputTag('thinningThingProducerA'),
0092     thinnedTag = cms.InputTag('thinningThingProducerC'),
0093     associationTag = cms.InputTag('thinningThingProducerC'),
0094     trackTag = cms.InputTag('trackOfThingsProducerC'),
0095     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8),
0096     expectedThinnedContent = cms.vint32(4, 5, 6, 7),
0097     expectedIndexesIntoParent = cms.vuint32(4, 5, 6, 7),
0098     expectedValues = cms.vint32(4, 5, 6, 7)
0099 )
0100 
0101 process.slimmingTestA = cms.EDAnalyzer("ThinningTestAnalyzer",
0102     parentTag = cms.InputTag('thingProducer', '', 'PROD'),
0103     thinnedTag = cms.InputTag('slimmingThingProducerA'),
0104     associationTag = cms.InputTag('slimmingThingProducerA'),
0105     trackTag = cms.InputTag('trackOfThingsProducerA'),
0106     thinnedSlimmedCount = cms.int32(1),
0107     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8,  9,
0108                                        10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
0109                                        20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
0110                                        30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
0111                                        40, 41, 42, 43, 44, 45, 46, 47, 48, 49
0112     ),
0113     expectedThinnedContent = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0114     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0115     expectedValues = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8)
0116 )
0117 
0118 process.out = cms.OutputModule("PoolOutputModule",
0119     fileName = cms.untracked.string('testThinningTest2.root'),
0120     outputCommands = cms.untracked.vstring(
0121         'keep *',
0122         'drop *_thingProducer_*_*',
0123         'drop *_thinningThingProducerD2_*_*',
0124         'drop *_thinningThingProducerD_*_*',
0125         'drop *_thinningThingProducerH_*_*',
0126         'drop *_thinningThingProducerI_*_*',
0127         'drop *_thinningThingProducerJ_*_*',
0128         'drop *_thinningThingProducerK_*_*',
0129         'drop *_thinningThingProducerL_*_*',
0130         'drop *_aliasM_*_*',
0131         'drop *_aliasN_*_*',
0132     )
0133 )
0134 
0135 process.p = cms.Path(process.thinningThingProducerD2 * process.testA * process.testB * process.testC
0136                      * process.slimmingTestA
0137                      * process.thingProducer
0138                      * process.thinningThingProducerD
0139                      * process.thinningThingProducerETEST
0140                      * process.thinningThingProducerFTEST)
0141 
0142 process.endPath = cms.EndPath(process.out)