CMS 3D CMS Logo

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.

00017                               :
00018     for item in dir(op):
00019         o = getattr(op,item)
00020         if isinstance(o,mod._Module):
00021             list.append(o)
00022         elif isinstance(o, cms.Sequence):
00023             _getModulesFromOp(o,list)
00024         elif isinstance(o,sqt._Sequenceable):
00025             _getModulesFromOp(o,list)
00026                     

def usedOutput::extractUsedOutputs (   process)

Definition at line 27 of file usedOutput.py.

00028                                :
00029     allEndPathModules = []
00030     for name in process._Process__endpaths:
00031         endpath = getattr(process,name)
00032         list = []
00033         getModulesFromSequence(endpath,list)
00034         allEndPathModules.extend(list)
00035     allUsedOutputModules = []
00036     for module in allEndPathModules:
00037         if isinstance(module, cms.OutputModule):
00038             allUsedOutputModules.append(module)
00039     return allUsedOutputModules

def usedOutput::getModulesFromSequence (   sequence,
  list 
)

Definition at line 6 of file usedOutput.py.

00007                                          :
00008     item = sequence._seq
00009     if isinstance(item,mod._Module):
00010         list.append(item)
00011     elif isinstance(item,cms.Sequence):
00012          getModulesFromSequence(item,list)
00013     else:
00014          _getModulesFromOp(item,list)
00015