CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
usedOutput.TestPrintPath Class Reference
Inheritance diagram for usedOutput.TestPrintPath:

Public Member Functions

def testGetModules
 

Detailed Description

Definition at line 42 of file usedOutput.py.

Member Function Documentation

def usedOutput.TestPrintPath.testGetModules (   self)

Definition at line 43 of file usedOutput.py.

References usedOutput.extractUsedOutputs(), and usedOutput.getModulesFromSequence().

43 
44  def testGetModules(self):
45  p=cms.Process("Test")
46  p.foo = cms.EDProducer("Foo")
47  p.p = cms.Path(p.foo)
48  list = []
49  getModulesFromSequence(p.p,list)
50  print len(list)
51 
52  p=cms.Process("Test")
53  p.foo = cms.OutputModule("Foo")
54  p.bar = cms.OutputModule("Bar")
55  p.unused = cms.OutputModule("Unused")
56  p.p = cms.EndPath(p.foo*p.bar)
57  usedOutputs = extractUsedOutputs(p)
58  print len(usedOutputs)
59 
60  p=cms.Process("Test")
61  p.foo = cms.EDProducer("Foo")
62  p.bar = cms.EDProducer("Bar")
63  p.s = cms.Sequence(p.foo*p.bar)
64  p.fii = cms.EDProducer("Fii")
65  p.p = cms.Path(p.s*p.fii)
66  list = []
67  getModulesFromSequence(p.p,list)
68  print len(list)
69 
70 
unittest.main()
def getModulesFromSequence
Definition: usedOutput.py:6
def extractUsedOutputs
Definition: usedOutput.py:27