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)
177 p.op.vsrc=cms.VInputTag(
"b")
178 p.s = cms.Sequence(p.a*p.b*p.c*p.sp*p.op)
180 self.assertNotEqual(cms.InputTag(
"new"), p.b.src)
181 self.assertEqual(cms.InputTag(
"new"), p.c.src)
182 self.assertEqual(cms.InputTag(
"new"), p.c.usrc)
183 self.assertEqual(cms.InputTag(
"new"), p.c.nested.src)
184 self.assertEqual(cms.InputTag(
"new"), p.c.nested.usrc)
185 self.assertFalse(p.c.nested.usrc.isTracked())
186 self.assertNotEqual(cms.InputTag(
"new"), p.c.nested.src2)
187 self.assertEqual(cms.InputTag(
"new"), p.c.nestedv[0].src)
188 self.assertNotEqual(cms.InputTag(
"new"), p.c.nestedv[1].src)
189 self.assertEqual(cms.InputTag(
"new"), p.c.unestedv[0].src)
190 self.assertNotEqual(cms.InputTag(
"new"), p.c.unestedv[1].src)
191 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[0])
192 self.assertEqual(cms.InputTag(
"new"), p.c.vec[1])
193 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[2])
194 self.assertNotEqual(cms.InputTag(
"new"), p.c.vec[3])
195 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[0])
196 self.assertEqual(cms.InputTag(
"new"), p.c.uvec[1])
197 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[2])
198 self.assertNotEqual(cms.InputTag(
"new"), p.c.uvec[3])
199 self.assertFalse(p.c.uvec[0].isTracked())
200 self.assertFalse(p.c.uvec[1].isTracked())
201 self.assertFalse(p.c.uvec[2].isTracked())
202 self.assertFalse(p.c.uvec[3].isTracked())
203 self.assertEqual(cms.InputTag(
"new"), p.sp.test1.src)
204 self.assertEqual(cms.InputTag(
"new"), p.sp.test1.nested.src)
205 self.assertEqual(cms.InputTag(
"c"), p.sp.test1.nested.src2)
206 self.assertEqual(cms.untracked.InputTag(
"new"), p.sp.test1.nested.usrc)
207 self.assertEqual(cms.InputTag(
"c"), p.sp.test2.src)
208 self.assertEqual(cms.InputTag(
"new"), p.sp.test2.nested.src)
209 self.assertEqual(cms.InputTag(
"c"), p.sp.test2.nested.src2)
210 self.assertEqual(cms.untracked.InputTag(
"new"), p.sp.test2.nested.usrc)
211 self.assertEqual(cms.InputTag(
"new"), p.op.src)
212 self.assertEqual(cms.InputTag(
"new"), p.op.vsrc[0])