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

◆ _getModulesFromOp()

def usedOutput._getModulesFromOp (   op,
  list 
)
private

Definition at line 17 of file usedOutput.py.

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 

References DeadROC_duringRun.dir.

Referenced by getModulesFromSequence().

◆ extractUsedOutputs()

def usedOutput.extractUsedOutputs (   process)

Definition at line 28 of file usedOutput.py.

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 

References getModulesFromSequence().

Referenced by usedOutput.TestPrintPath.testGetModules().

◆ getModulesFromSequence()

def usedOutput.getModulesFromSequence (   sequence,
  list 
)

Definition at line 7 of file usedOutput.py.

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 

References _getModulesFromOp().

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

usedOutput._getModulesFromOp
def _getModulesFromOp(op, list)
Definition: usedOutput.py:17
usedOutput.getModulesFromSequence
def getModulesFromSequence(sequence, list)
Definition: usedOutput.py:7
usedOutput.extractUsedOutputs
def extractUsedOutputs(process)
Definition: usedOutput.py:28
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23