CMS 3D CMS Logo

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

Public Member Functions

def __init__ (self, paramName, paramSearch, paramValue, verbose=False)
 
def enter (self, visitee)
 
def leave (self, visitee)
 

Private Attributes

 _paramName
 
 _paramSearch
 
 _paramValue
 
 _verbose
 

Detailed Description

Visitor that travels within a cms.Sequence, looks for a parameter and replaces its value

Definition at line 101 of file MassReplace.py.

Constructor & Destructor Documentation

def MassReplace.MassSearchReplaceParamVisitor.__init__ (   self,
  paramName,
  paramSearch,
  paramValue,
  verbose = False 
)

Definition at line 103 of file MassReplace.py.

103  def __init__(self,paramName,paramSearch,paramValue,verbose=False):
104  self._paramName = paramName
105  self._paramValue = paramValue
106  self._paramSearch = paramSearch
107  self._verbose = verbose
def __init__(self, paramName, paramSearch, paramValue, verbose=False)
Definition: MassReplace.py:103

Member Function Documentation

def MassReplace.MassSearchReplaceParamVisitor.enter (   self,
  visitee 
)

Definition at line 108 of file MassReplace.py.

References MassReplace.MassSearchParamVisitor._paramName, MassReplace.MassSearchReplaceParamVisitor._paramName, MassReplace.MassSearchReplaceAnyInputTagVisitor._paramSearch, MassReplace.MassSearchParamVisitor._paramSearch, MassReplace.MassSearchReplaceParamVisitor._paramSearch, ConfigBuilder.ConfigBuilder.MassSearchReplaceProcessNameVisitor._paramSearch, MassReplace.MassSearchReplaceParamVisitor._paramValue, MassReplace.MassSearchReplaceAnyInputTagVisitor._verbose, HTMHTAnalyzer._verbose, uploads.output._verbose, uploads.uploader._verbose, MassReplace.MassSearchReplaceParamVisitor._verbose, and ConfigBuilder.ConfigBuilder.MassSearchReplaceProcessNameVisitor._verbose.

108  def enter(self,visitee):
109  if (hasattr(visitee,self._paramName)):
110  if getattr(visitee,self._paramName) == self._paramSearch:
111  if self._verbose:print "Replaced %s.%s: %s => %s" % (visitee,self._paramName,getattr(visitee,self._paramName),self._paramValue)
112  setattr(visitee,self._paramName,self._paramValue)
def MassReplace.MassSearchReplaceParamVisitor.leave (   self,
  visitee 
)

Definition at line 113 of file MassReplace.py.

113  def leave(self,visitee):
114  pass
115 

Member Data Documentation

MassReplace.MassSearchReplaceParamVisitor._paramName
private

Definition at line 104 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramSearch
private

Definition at line 106 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramValue
private

Definition at line 105 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._verbose
private