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 43 of file usedOutput.py.

Member Function Documentation

◆ testGetModules()

def usedOutput.TestPrintPath.testGetModules (   self)

Definition at line 44 of file usedOutput.py.

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 
71  unittest.main()

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

print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
usedOutput.getModulesFromSequence
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:7
usedOutput.extractUsedOutputs
def extractUsedOutputs(process)
Definition: usedOutput.py:28