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

References dir.

Referenced by getModulesFromSequence().

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 
27 
def _getModulesFromOp(op, list)
Definition: usedOutput.py:17
dbl *** dir
Definition: mlp_gen.cc:35
def usedOutput.extractUsedOutputs (   process)

Definition at line 28 of file usedOutput.py.

References getModulesFromSequence().

Referenced by usedOutput.TestPrintPath.testGetModules().

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
40 
def extractUsedOutputs(process)
Definition: usedOutput.py:28
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:7
def usedOutput.getModulesFromSequence (   sequence,
  list 
)

Definition at line 7 of file usedOutput.py.

References _getModulesFromOp().

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

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 
16 
def _getModulesFromOp(op, list)
Definition: usedOutput.py:17
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:7