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 100 of file MassReplace.py.

Constructor & Destructor Documentation

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

Definition at line 102 of file MassReplace.py.

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

Member Function Documentation

def MassReplace.MassSearchReplaceParamVisitor.enter (   self,
  visitee 
)

Definition at line 107 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.

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

Definition at line 112 of file MassReplace.py.

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

Member Data Documentation

MassReplace.MassSearchReplaceParamVisitor._paramName
private

Definition at line 103 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramSearch
private

Definition at line 105 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramValue
private

Definition at line 104 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._verbose
private