258 import FWCore.ParameterSet.Config
as cms
259 process = cms.Process(
"TEST")
260 process.a = cms.EDProducer(
"AProd")
261 process.b = cms.EDProducer(
"BProd")
262 process.c = cms.EDProducer(
"CProd")
263 process.d = cms.EDProducer(
"DProd",
264 par1 = cms.InputTag(
"f1"))
265 process.e = cms.EDProducer(
"EProd",
266 par1 = cms.VInputTag(cms.InputTag(
"x"), cms.InputTag(
"f1",
"y")))
267 process.f = cms.EDProducer(
"FProd",
268 par1 = cms.VInputTag(
"x",
"y",
"f1"))
269 process.g = cms.EDProducer(
"GProd",
270 par1 = cms.InputTag(
"f"))
271 process.h = cms.EDProducer(
"HProd",
272 par1 = cms.bool(
True),
275 cms.PSet(foo = cms.bool(
True)),
278 bar = cms.bool(
True),
279 foo1 = cms.InputTag(
"f1"),
280 foo2 = cms.VInputTag(cms.InputTag(
"x"), cms.InputTag(
"f11",
"y")),
281 foo3 = cms.VInputTag(
"q",
"r","s"))
286 process.k = cms.EDProducer(
"KProd",
287 par1 = cms.bool(
True),
290 cms.PSet(foo = cms.bool(
True)),
293 bar = cms.bool(
True),
294 xSrc = cms.string(
"f")
300 process.f1 = cms.EDFilter(
"Filter")
301 process.f2 = cms.EDFilter(
"Filter2")
302 process.f3 = cms.EDFilter(
"Filter3")
303 process.f4 = cms.EDFilter(
"FIlter4")
304 process.p1 = cms.Path(process.a+process.b+process.f1+process.d+process.e+process.f+process.g+process.h+process.k)
305 process.p4 = cms.Path(process.a+process.f2+process.b+~process.f1+cms.ignore(process.f4))
306 process.p2 = cms.Path(process.a+process.b)
307 process.p3 = cms.Path(process.f1)
309 self.assertEqual(process.options.allowUnscheduled, cms.untracked.bool(
True))
310 self.assert_(hasattr(process,
'p2'))
311 self.assert_(hasattr(process,
'a'))
312 self.assert_(hasattr(process,
'b'))
313 self.assert_(
not hasattr(process,
'c'))
314 self.assert_(hasattr(process,
'd'))
315 self.assert_(hasattr(process,
'e'))
316 self.assert_(hasattr(process,
'f'))
317 self.assert_(hasattr(process,
'g'))
318 self.assert_(hasattr(process,
'f1'))
319 self.assert_(hasattr(process,
'f2'))
320 self.assert_(
not hasattr(process,
'f3'))
321 self.assert_(hasattr(process,
'f4'))
322 self.assertEqual(process.p1.dumpPython(
None),
'cms.Path(process.f1+process.d+process.e+process.f+process.g+process.h+process.k)\n')
323 self.assertEqual(process.p2.dumpPython(
None),
'cms.Path()\n')
324 self.assertEqual(process.p3.dumpPython(
None),
'cms.Path(process.f1)\n')
self.assertEqual(process.p4.dumpPython(
None),
'cms.Path(process.f2+~process.f1+cms.ignore(process.f4))\n')