CMS 3D CMS Logo

List of all members | Public Member Functions
usedOutput.TestPrintPath Class Reference
Inheritance diagram for usedOutput.TestPrintPath:

Public Member Functions

def testGetModules (self)
 

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