Back to home page

Project CMSSW displayed by LXR

 
 

    


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

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