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