CMS 3D CMS Logo

Classes | Functions
usedOutput Namespace Reference

Classes

class  TestPrintPath
 

Functions

def _getModulesFromOp (op, list)
 
def extractUsedOutputs (process)
 
def getModulesFromSequence (sequence, list)
 

Function Documentation

def usedOutput._getModulesFromOp (   op,
  list 
)
private

Definition at line 16 of file usedOutput.py.

References dir.

Referenced by getModulesFromSequence().

16 def _getModulesFromOp(op,list):
17  for item in dir(op):
18  o = getattr(op,item)
19  if isinstance(o,mod._Module):
20  list.append(o)
21  elif isinstance(o, cms.Sequence):
22  _getModulesFromOp(o,list)
23  elif isinstance(o,sqt._Sequenceable):
24  _getModulesFromOp(o,list)
25 
26 
def _getModulesFromOp(op, list)
Definition: usedOutput.py:16
dbl *** dir
Definition: mlp_gen.cc:35
def usedOutput.extractUsedOutputs (   process)

Definition at line 27 of file usedOutput.py.

References getModulesFromSequence().

Referenced by usedOutput.TestPrintPath.testGetModules().

27 def extractUsedOutputs(process):
28  allEndPathModules = []
29  for name in process._Process__endpaths:
30  endpath = getattr(process,name)
31  list = []
32  getModulesFromSequence(endpath,list)
33  allEndPathModules.extend(list)
34  allUsedOutputModules = []
35  for module in allEndPathModules:
36  if isinstance(module, cms.OutputModule):
37  allUsedOutputModules.append(module)
38  return allUsedOutputModules
39 
def extractUsedOutputs(process)
Definition: usedOutput.py:27
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:6
def usedOutput.getModulesFromSequence (   sequence,
  list 
)

Definition at line 6 of file usedOutput.py.

References _getModulesFromOp().

Referenced by ModuleToSequenceAssign.assignModulesToSeqs(), extractUsedOutputs(), and usedOutput.TestPrintPath.testGetModules().

6 def getModulesFromSequence(sequence,list):
7  item = sequence._seq
8  if isinstance(item,mod._Module):
9  list.append(item)
10  elif isinstance(item,cms.Sequence):
11  getModulesFromSequence(item,list)
12  else:
13  _getModulesFromOp(item,list)
14 
15 
def _getModulesFromOp(op, list)
Definition: usedOutput.py:16
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:6