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