CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions
usedOutput Namespace Reference

Classes

class  TestPrintPath
 

Functions

def _getModulesFromOp
 
def extractUsedOutputs
 
def getModulesFromSequence
 

Function Documentation

def usedOutput._getModulesFromOp (   op,
  list 
)
private

Definition at line 16 of file usedOutput.py.

References dir.

Referenced by getModulesFromSequence().

16 
17 def _getModulesFromOp(op,list):
18  for item in dir(op):
19  o = getattr(op,item)
20  if isinstance(o,mod._Module):
21  list.append(o)
22  elif isinstance(o, cms.Sequence):
23  _getModulesFromOp(o,list)
24  elif isinstance(o,sqt._Sequenceable):
25  _getModulesFromOp(o,list)
26 
def _getModulesFromOp
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 
28 def extractUsedOutputs(process):
29  allEndPathModules = []
30  for name in process._Process__endpaths:
31  endpath = getattr(process,name)
32  list = []
33  getModulesFromSequence(endpath,list)
34  allEndPathModules.extend(list)
35  allUsedOutputModules = []
36  for module in allEndPathModules:
37  if isinstance(module, cms.OutputModule):
38  allUsedOutputModules.append(module)
39  return allUsedOutputModules
def getModulesFromSequence
Definition: usedOutput.py:6
def extractUsedOutputs
Definition: usedOutput.py:27
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 
7 def getModulesFromSequence(sequence,list):
8  item = sequence._seq
9  if isinstance(item,mod._Module):
10  list.append(item)
11  elif isinstance(item,cms.Sequence):
12  getModulesFromSequence(item,list)
13  else:
14  _getModulesFromOp(item,list)
15 
def getModulesFromSequence
Definition: usedOutput.py:6
def _getModulesFromOp
Definition: usedOutput.py:16