CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 43 of file usedOutput.py.

Member Function Documentation

def usedOutput.TestPrintPath.testGetModules (   self)

Definition at line 44 of file usedOutput.py.

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

44 
45  def testGetModules(self):
46  p=cms.Process("Test")
47  p.foo = cms.EDProducer("Foo")
48  p.p = cms.Path(p.foo)
49  list = []
50  getModulesFromSequence(p.p,list)
51  print(len(list))
52 
53  p=cms.Process("Test")
54  p.foo = cms.OutputModule("Foo")
55  p.bar = cms.OutputModule("Bar")
56  p.unused = cms.OutputModule("Unused")
57  p.p = cms.EndPath(p.foo*p.bar)
58  usedOutputs = extractUsedOutputs(p)
59  print(len(usedOutputs))
60 
61  p=cms.Process("Test")
62  p.foo = cms.EDProducer("Foo")
63  p.bar = cms.EDProducer("Bar")
64  p.s = cms.Sequence(p.foo*p.bar)
65  p.fii = cms.EDProducer("Fii")
66  p.p = cms.Path(p.s*p.fii)
67  list = []
68  getModulesFromSequence(p.p,list)
69  print(len(list))
70 
71 
unittest.main()
def getModulesFromSequence
Definition: usedOutput.py:7
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def extractUsedOutputs
Definition: usedOutput.py:28