Public Member Functions | |
def | setUp |
def | testCloning |
def | testContains |
def | testJetCollectionString |
def | testListModules |
def | testMassSearchReplaceParam |
Definition at line 274 of file HiHelperTools.py.
def HiHelperTools::TestModuleCommand::setUp | ( | self | ) |
Nothing to do
Definition at line 275 of file HiHelperTools.py.
def HiHelperTools::TestModuleCommand::testCloning | ( | self | ) |
Definition at line 278 of file HiHelperTools.py.
00279 : 00280 p = cms.Process("test") 00281 p.a = cms.EDProducer("a", src=cms.InputTag("gen")) 00282 p.b = cms.EDProducer("b", src=cms.InputTag("a")) 00283 p.c = cms.EDProducer("c", src=cms.InputTag("b","instance")) 00284 p.s = cms.Sequence(p.a*p.b*p.c *p.a) 00285 cloneProcessingSnippet(p, p.s, "New") self.assertEqual(p.dumpPython(),'import FWCore.ParameterSet.Config as cms\n\nprocess = cms.Process("test")\n\nprocess.a = cms.EDProducer("a",\n src = cms.InputTag("gen")\n)\n\n\nprocess.c = cms.EDProducer("c",\n src = cms.InputTag("b","instance")\n)\n\n\nprocess.cNew = cms.EDProducer("c",\n src = cms.InputTag("bNew","instance")\n)\n\n\nprocess.bNew = cms.EDProducer("b",\n src = cms.InputTag("aNew")\n)\n\n\nprocess.aNew = cms.EDProducer("a",\n src = cms.InputTag("gen")\n)\n\n\nprocess.b = cms.EDProducer("b",\n src = cms.InputTag("a")\n)\n\n\nprocess.s = cms.Sequence(process.a*process.b*process.c*process.a)\n\n\nprocess.sNew = cms.Sequence(process.aNew+process.bNew+process.cNew)\n\n\n')
def HiHelperTools::TestModuleCommand::testContains | ( | self | ) |
Definition at line 286 of file HiHelperTools.py.
00287 : 00288 p = cms.Process("test") 00289 p.a = cms.EDProducer("a", src=cms.InputTag("gen")) 00290 p.b = cms.EDProducer("ab", src=cms.InputTag("a")) 00291 p.c = cms.EDProducer("ac", src=cms.InputTag("b")) 00292 p.s1 = cms.Sequence(p.a*p.b*p.c) 00293 p.s2 = cms.Sequence(p.b*p.c) 00294 self.assert_( contains(p.s1, "a") ) self.assert_( not contains(p.s2, "a") )
def HiHelperTools::TestModuleCommand::testJetCollectionString | ( | self | ) |
Definition at line 295 of file HiHelperTools.py.
def HiHelperTools::TestModuleCommand::testListModules | ( | self | ) |
Definition at line 298 of file HiHelperTools.py.
def HiHelperTools::TestModuleCommand::testMassSearchReplaceParam | ( | self | ) |
Definition at line 305 of file HiHelperTools.py.
00306 : 00307 p = cms.Process("test") 00308 p.a = cms.EDProducer("a", src=cms.InputTag("gen")) 00309 p.b = cms.EDProducer("ab", src=cms.InputTag("a")) 00310 p.c = cms.EDProducer("ac", src=cms.InputTag("b"), 00311 nested = cms.PSet(src = cms.InputTag("c")) 00312 ) 00313 p.s = cms.Sequence(p.a*p.b*p.c) 00314 massSearchReplaceParam(p.s,"src",cms.InputTag("b"),"a") 00315 self.assertEqual(cms.InputTag("a"),p.c.src) 00316 self.assertNotEqual(cms.InputTag("a"),p.c.nested.src) 00317 unittest.main()