CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
helpers.GatherAllModulesVisitor Class Reference
Inheritance diagram for helpers.GatherAllModulesVisitor:

Public Member Functions

def __init__ (self, gatheredInstance=cms._Module)
 
def enter (self, visitee)
 
def leave (self, visitee)
 
def modules (self)
 

Private Attributes

 _gatheredInstance
 
 _modules
 

Detailed Description

Visitor that travels within a cms.Sequence, and returns a list of objects of type gatheredInance(e.g. modules) that have it

Definition at line 143 of file helpers.py.

Constructor & Destructor Documentation

◆ __init__()

def helpers.GatherAllModulesVisitor.__init__ (   self,
  gatheredInstance = cms._Module 
)

Definition at line 145 of file helpers.py.

145  def __init__(self, gatheredInstance=cms._Module):
146  self._modules = []
147  self._gatheredInstance= gatheredInstance

Member Function Documentation

◆ enter()

def helpers.GatherAllModulesVisitor.enter (   self,
  visitee 
)

Definition at line 148 of file helpers.py.

148  def enter(self,visitee):
149  if isinstance(visitee,self._gatheredInstance):
150  self._modules.append(visitee)

References helpers.GatherAllModulesVisitor._gatheredInstance, MassReplace.MassSearchParamVisitor._modules, helpers.GatherAllModulesVisitor._modules, and mps_setup.append.

◆ leave()

def helpers.GatherAllModulesVisitor.leave (   self,
  visitee 
)

Definition at line 151 of file helpers.py.

151  def leave(self,visitee):
152  pass

◆ modules()

def helpers.GatherAllModulesVisitor.modules (   self)

Definition at line 153 of file helpers.py.

153  def modules(self):
154  return self._modules
155 

Member Data Documentation

◆ _gatheredInstance

helpers.GatherAllModulesVisitor._gatheredInstance
private

Definition at line 147 of file helpers.py.

Referenced by helpers.GatherAllModulesVisitor.enter().

◆ _modules

helpers.GatherAllModulesVisitor._modules
private

Definition at line 146 of file helpers.py.

Referenced by helpers.GatherAllModulesVisitor.enter().

LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
mps_setup.append
append
Definition: mps_setup.py:85