Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # Test drop on input
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 process = cms.Process("TESTDROPONINPUT")
0006 
0007 process.options = cms.untracked.PSet(
0008     numberOfStreams = cms.untracked.uint32(1)
0009 )
0010 
0011 process.maxEvents = cms.untracked.PSet(
0012     input = cms.untracked.int32(3)
0013 )
0014 
0015 process.source = cms.Source("PoolSource",
0016   fileNames = cms.untracked.vstring('file:testThinningTest1.root'),
0017   inputCommands = cms.untracked.vstring(
0018     'keep *',
0019     'drop *_thingProducer_*_*',
0020     'drop *_thinningThingProducerD_*_*',
0021     'drop *_thinningThingProducerH_*_*',
0022     'drop *_thinningThingProducerI_*_*',
0023     'drop *_thinningThingProducerJ_*_*',
0024     'drop *_thinningThingProducerK_*_*',
0025     'drop *_thinningThingProducerL_*_*',
0026     'drop *_aliasM_*_*',
0027     'drop *_aliasN_*_*'
0028   ),
0029   dropDescendantsOfDroppedBranches = cms.untracked.bool(False)
0030 )
0031 
0032 process.testA = cms.EDAnalyzer("ThinningTestAnalyzer",
0033     parentTag = cms.InputTag('thingProducer'),
0034     thinnedTag = cms.InputTag('thinningThingProducerA'),
0035     associationTag = cms.InputTag('thinningThingProducerA'),
0036     trackTag = cms.InputTag('trackOfThingsProducerA'),
0037     parentWasDropped = cms.bool(True),
0038     expectedThinnedContent = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0039     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3, 4, 5, 6, 7, 8),
0040     expectedValues = cms.vint32(0, 1, 2, 3, 4, 5, 6, 7, 8)
0041 )
0042 
0043 process.testB = cms.EDAnalyzer("ThinningTestAnalyzer",
0044     parentTag = cms.InputTag('thinningThingProducerA'),
0045     thinnedTag = cms.InputTag('thinningThingProducerB'),
0046     associationTag = cms.InputTag('thinningThingProducerB'),
0047     trackTag = cms.InputTag('trackOfThingsProducerB'),
0048     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8),
0049     expectedThinnedContent = cms.vint32(0, 1, 2, 3),
0050     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3),
0051     expectedValues = cms.vint32(0, 1, 2, 3)
0052 )
0053 
0054 process.testC = cms.EDAnalyzer("ThinningTestAnalyzer",
0055     parentTag = cms.InputTag('thinningThingProducerA'),
0056     thinnedTag = cms.InputTag('thinningThingProducerC'),
0057     associationTag = cms.InputTag('thinningThingProducerC'),
0058     trackTag = cms.InputTag('trackOfThingsProducerC'),
0059     expectedParentContent = cms.vint32( 0,  1,  2,  3,  4,  5,  6,  7,  8),
0060     expectedThinnedContent = cms.vint32(4, 5, 6, 7),
0061     expectedIndexesIntoParent = cms.vuint32(4, 5, 6, 7),
0062     expectedValues = cms.vint32(4, 5, 6, 7)
0063 )
0064 
0065 process.testD = cms.EDAnalyzer("ThinningTestAnalyzer",
0066     parentTag = cms.InputTag('thingProducer'),
0067     thinnedTag = cms.InputTag('thinningThingProducerD'),
0068     associationTag = cms.InputTag('thinningThingProducerD'),
0069     trackTag = cms.InputTag('trackOfThingsProducerD'),
0070     parentWasDropped = cms.bool(True),
0071     thinnedWasDropped = cms.bool(True),
0072     expectedIndexesIntoParent = cms.vuint32(10, 11, 12, 13, 14, 15, 16, 17, 18),
0073     expectedValues = cms.vint32(10, 11, 12, 13, 14, 15, 16, 17, -1)
0074 )
0075 
0076 process.testE = cms.EDAnalyzer("ThinningTestAnalyzer",
0077     parentTag = cms.InputTag('thinningThingProducerD'),
0078     thinnedTag = cms.InputTag('thinningThingProducerE'),
0079     associationTag = cms.InputTag('thinningThingProducerE'),
0080     trackTag = cms.InputTag('trackOfThingsProducerE'),
0081     parentWasDropped = cms.bool(True),
0082     expectedThinnedContent = cms.vint32(10, 11, 12, 13, 14),
0083     expectedIndexesIntoParent = cms.vuint32(0, 1, 2, 3, 4),
0084     expectedValues = cms.vint32(10, 11, 12, 13, 14)
0085 )
0086 
0087 process.testF = cms.EDAnalyzer("ThinningTestAnalyzer",
0088     parentTag = cms.InputTag('thinningThingProducerD'),
0089     thinnedTag = cms.InputTag('thinningThingProducerF'),
0090     associationTag = cms.InputTag('thinningThingProducerF'),
0091     trackTag = cms.InputTag('trackOfThingsProducerF'),
0092     parentWasDropped = cms.bool(True),
0093     expectedThinnedContent = cms.vint32(14, 15, 16, 17),
0094     expectedIndexesIntoParent = cms.vuint32(4, 5, 6, 7),
0095     expectedValues = cms.vint32(14, 15, 16, 17)
0096 )
0097 
0098 process.testG = cms.EDAnalyzer("ThinningTestAnalyzer",
0099     parentTag = cms.InputTag('thingProducer'),
0100     thinnedTag = cms.InputTag('thinningThingProducerG'),
0101     associationTag = cms.InputTag('thinningThingProducerG'),
0102     trackTag = cms.InputTag('trackOfThingsProducerG'),
0103     parentWasDropped = cms.bool(True),
0104     expectedThinnedContent = cms.vint32(20, 21, 22, 23, 24, 25, 26, 27, 28),
0105     expectedIndexesIntoParent = cms.vuint32(20, 21, 22, 23, 24, 25, 26, 27, 28),
0106     expectedValues = cms.vint32(20, 21, 22, 23, 24, 25, 26, 27, 28)
0107 )
0108 
0109 process.testH = cms.EDAnalyzer("ThinningTestAnalyzer",
0110     parentTag = cms.InputTag('thinningThingProducerG'),
0111     thinnedTag = cms.InputTag('thinningThingProducerH'),
0112     associationTag = cms.InputTag('thinningThingProducerH'),
0113     trackTag = cms.InputTag('trackOfThingsProducerH'),
0114     thinnedWasDropped = cms.bool(True),
0115     expectedParentContent = cms.vint32( 20,  21,  22,  23,  24,  25,  26,  27,  28),
0116     associationShouldBeDropped = cms.bool(True),
0117     expectedValues = cms.vint32(20, 21, 22, 23)
0118 )
0119 
0120 process.testI = cms.EDAnalyzer("ThinningTestAnalyzer",
0121     parentTag = cms.InputTag('thinningThingProducerG'),
0122     thinnedTag = cms.InputTag('thinningThingProducerI'),
0123     associationTag = cms.InputTag('thinningThingProducerI'),
0124     trackTag = cms.InputTag('trackOfThingsProducerI'),
0125     thinnedWasDropped = cms.bool(True),
0126     associationShouldBeDropped = cms.bool(True),
0127     expectedParentContent = cms.vint32( 20,  21,  22,  23,  24,  25,  26,  27,  28),
0128     expectedValues = cms.vint32(24, 25, 26, 27)
0129 )
0130 
0131 process.testJ = cms.EDAnalyzer("ThinningTestAnalyzer",
0132     parentTag = cms.InputTag('thingProducer'),
0133     thinnedTag = cms.InputTag('thinningThingProducerJ'),
0134     associationTag = cms.InputTag('thinningThingProducerJ'),
0135     trackTag = cms.InputTag('trackOfThingsProducerJ'),
0136     parentWasDropped = cms.bool(True),
0137     thinnedWasDropped = cms.bool(True),
0138     associationShouldBeDropped = cms.bool(True),
0139     expectedValues = cms.vint32(-1, -1, -1, -1, -1, -1, -1, -1, -1)
0140 )
0141 
0142 process.testK = cms.EDAnalyzer("ThinningTestAnalyzer",
0143     parentTag = cms.InputTag('thinningThingProducerJ'),
0144     thinnedTag = cms.InputTag('thinningThingProducerK'),
0145     associationTag = cms.InputTag('thinningThingProducerK'),
0146     trackTag = cms.InputTag('trackOfThingsProducerK'),
0147     parentWasDropped = cms.bool(True),
0148     thinnedWasDropped = cms.bool(True),
0149     associationShouldBeDropped = cms.bool(True),
0150     expectedValues = cms.vint32(-1, -1, -1, -1)
0151 )
0152 
0153 process.testL = cms.EDAnalyzer("ThinningTestAnalyzer",
0154     parentTag = cms.InputTag('thinningThingProducerJ'),
0155     thinnedTag = cms.InputTag('thinningThingProducerL'),
0156     associationTag = cms.InputTag('thinningThingProducerL'),
0157     trackTag = cms.InputTag('trackOfThingsProducerL'),
0158     parentWasDropped = cms.bool(True),
0159     thinnedWasDropped = cms.bool(True),
0160     associationShouldBeDropped = cms.bool(True),
0161     expectedValues = cms.vint32(-1, -1, -1, -1)
0162 )
0163 
0164 process.testM = cms.EDAnalyzer("ThinningTestAnalyzer",
0165     parentTag = cms.InputTag('thingProducer'),
0166     thinnedTag = cms.InputTag('thinningThingProducerM'),
0167     associationTag = cms.InputTag('thinningThingProducerM'),
0168     trackTag = cms.InputTag('trackOfThingsProducerM'),
0169     parentWasDropped = cms.bool(True),
0170     thinnedWasDropped = cms.bool(True),
0171     expectedIndexesIntoParent = cms.vuint32(40, 41, 42, 43, 44, 45, 46, 47, 48),
0172     expectedValues = cms.vint32(-1, -1, -1, -1, 44, 45, 46, 47, -1)
0173 )
0174 
0175 process.testN = cms.EDAnalyzer("ThinningTestAnalyzer",
0176     parentTag = cms.InputTag('thinningThingProducerM'),
0177     thinnedTag = cms.InputTag('thinningThingProducerN'),
0178     associationTag = cms.InputTag('thinningThingProducerN'),
0179     trackTag = cms.InputTag('trackOfThingsProducerN'),
0180     parentWasDropped = cms.bool(True),
0181     thinnedWasDropped = cms.bool(True),
0182     associationShouldBeDropped = cms.bool(True),
0183     expectedValues = cms.vint32(-1, -1, -1, -1)
0184 )
0185 
0186 process.testO = cms.EDAnalyzer("ThinningTestAnalyzer",
0187     parentTag = cms.InputTag('thinningThingProducerM'),
0188     thinnedTag = cms.InputTag('aliasO'),
0189     associationTag = cms.InputTag('thinningThingProducerO'),
0190     trackTag = cms.InputTag('trackOfThingsProducerO'),
0191     thinnedIsAlias = cms.bool(True),
0192     parentWasDropped = cms.bool(True),
0193     expectedThinnedContent = cms.vint32(44, 45, 46, 47),
0194     expectedIndexesIntoParent = cms.vuint32(4, 5, 6, 7),
0195     expectedValues = cms.vint32(44, 45, 46, 47)
0196 )
0197 
0198 process.out = cms.OutputModule("PoolOutputModule",
0199     fileName = cms.untracked.string('testThinningTestDropOnInput.root')
0200 )
0201 
0202 process.p = cms.Path(process.testA *
0203                      process.testB *
0204                      process.testC *
0205                      process.testD *
0206                      process.testE *
0207                      process.testF *
0208                      process.testG *
0209                      process.testH *
0210                      process.testI *
0211                      process.testJ *
0212                      process.testK *
0213                      process.testL *
0214                      process.testM *
0215                      process.testN *
0216                      process.testO
0217 )
0218 
0219 process.endPath = cms.EndPath(process.out)