156 def testMassSearchReplaceAnyInputTag(self):
157 p = cms.Process(
"test")
158 p.a = cms.EDProducer(
"a", src=cms.InputTag(
"gen"))
159 p.b = cms.EDProducer(
"ab", src=cms.InputTag(
"a"))
160 p.c = cms.EDProducer(
"ac", src=cms.InputTag(
"b"), usrc=cms.untracked.InputTag(
"b"),
161 nested = cms.PSet(src = cms.InputTag(
"b"), src2 = cms.InputTag(
"c"), usrc = cms.untracked.InputTag(
"b")),
162 nestedv = cms.VPSet(cms.PSet(src = cms.InputTag(
"b")), cms.PSet(src = cms.InputTag(
"d"))),
163 unestedv = cms.untracked.VPSet(cms.untracked.PSet(src = cms.InputTag(
"b")), cms.untracked.PSet(src = cms.InputTag(
"d"))),
164 vec = cms.VInputTag(cms.InputTag(
"a"), cms.InputTag(
"b"), cms.InputTag(
"c"), cms.InputTag(
"d")),
165 uvec = cms.untracked.VInputTag(cms.untracked.InputTag(
"a"), cms.untracked.InputTag(
"b"), cms.untracked.InputTag(
"c"), cms.untracked.InputTag(
"d")),
167 p.sp = SwitchProducerTest(
168 test1 = cms.EDProducer(
"a", src = cms.InputTag(
"b"),
169 nested = cms.PSet(src = cms.InputTag(
"b"), src2 = cms.InputTag(
"c"), usrc = cms.untracked.InputTag(
"b"))
171 test2 = cms.EDProducer(
"b", src = cms.InputTag(
"c"),
172 nested = cms.PSet(src = cms.InputTag(
"b"), src2 = cms.InputTag(
"c"), usrc = cms.untracked.InputTag(
"b"))
175 p.op = cms.EDProducer(
"op", src = cms.optional.InputTag, unset = cms.optional.InputTag, vsrc = cms.optional.VInputTag, vunset = cms.optional.VInputTag)
176 p.op2 = cms.EDProducer(
"op2", src = cms.optional.InputTag, unset = cms.optional.InputTag, vsrc = cms.optional.VInputTag, vunset = cms.optional.VInputTag)
179 p.op2.src=cms.InputTag(
"b")
180 p.op2.vsrc = cms.VInputTag(
"b")
181 p.s = cms.Sequence(p.a*p.b*p.c*p.sp*p.op*p.op2)
183 self.assertNotEqual(cms.InputTag(
"new"), p.b.src)
184 self.assertEqual(cms.InputTag(
"new"), p.c.src)
185 self.assertEqual(cms.InputTag(
"new"), p.c.usrc)
186 self.assertEqual(cms.InputTag(
"new"), p.c.nested.src)
187 self.assertEqual(cms.InputTag(
"new"), p.c.nested.usrc)
188 self.assertFalse(p.c.nested.usrc.isTracked())
189 self.assertNotEqual(cms.InputTag(
"new"), p.c.nested.src2)
190 self.assertEqual(cms.InputTag(
"new"), p.c.nestedv[0].src)
191 self.assertNotEqual(cms.InputTag(
"new"), p.c.nestedv[1].src)
192 self.assertEqual(cms.InputTag(
"new"), p.c.unestedv[0].src)
193 self.assertNotEqual(cms.InputTag(
"new"), p.c.unestedv[1].src)
194 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[0])
195 self.assertEqual(cms.InputTag(
"new"), p.c.vec[1])
196 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[2])
197 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[3])
198 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[0])
199 self.assertEqual(cms.InputTag(
"new"), p.c.uvec[1])
200 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[2])
201 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[3])
202 self.assertFalse(p.c.uvec[0].isTracked())
203 self.assertFalse(p.c.uvec[1].isTracked())
204 self.assertFalse(p.c.uvec[2].isTracked())
205 self.assertFalse(p.c.uvec[3].isTracked())
206 self.assertEqual(cms.InputTag(
"new"), p.sp.test1.src)
207 self.assertEqual(cms.InputTag(
"new"), p.sp.test1.nested.src)
208 self.assertEqual(cms.InputTag(
"c"), p.sp.test1.nested.src2)
209 self.assertEqual(cms.untracked.InputTag(
"new"), p.sp.test1.nested.usrc)
210 self.assertEqual(cms.InputTag(
"c"), p.sp.test2.src)
211 self.assertEqual(cms.InputTag(
"new"), p.sp.test2.nested.src)
212 self.assertEqual(cms.InputTag(
"c"), p.sp.test2.nested.src2)
213 self.assertEqual(cms.untracked.InputTag(
"new"), p.sp.test2.nested.usrc)
214 self.assertEqual(cms.InputTag(
"new"), p.op.src)
215 self.assertEqual(cms.InputTag(
"new"), p.op.vsrc[0])
216 self.assertEqual(cms.InputTag(
"new"), p.op2.src)
217 self.assertEqual(cms.InputTag(
"new"), p.op2.vsrc[0])
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)