CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HiHelperTools.MassSearchReplaceParamVisitor Class Reference
Inheritance diagram for HiHelperTools.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 35 of file HiHelperTools.py.

Constructor & Destructor Documentation

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

Definition at line 37 of file HiHelperTools.py.

37  def __init__(self,paramName,paramSearch,paramValue,verbose=False):
38  self._paramName = paramName
39  self._paramValue = paramValue
40  self._paramSearch = paramSearch
41  self._verbose = verbose
def __init__(self, paramName, paramSearch, paramValue, verbose=False)

Member Function Documentation

def HiHelperTools.MassSearchReplaceParamVisitor.enter (   self,
  visitee 
)

Definition at line 42 of file HiHelperTools.py.

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

42  def enter(self,visitee):
43  if (hasattr(visitee,self._paramName)):
44  if getattr(visitee,self._paramName) == self._paramSearch:
45  if self._verbose:print "Replaced %s.%s: %s => %s" % (visitee,self._paramName,getattr(visitee,self._paramName),self._paramValue)
46  setattr(visitee,self._paramName,self._paramValue)
def HiHelperTools.MassSearchReplaceParamVisitor.leave (   self,
  visitee 
)

Definition at line 47 of file HiHelperTools.py.

47  def leave(self,visitee):
48  pass
49 

Member Data Documentation

HiHelperTools.MassSearchReplaceParamVisitor._paramName
private
HiHelperTools.MassSearchReplaceParamVisitor._paramSearch
private
HiHelperTools.MassSearchReplaceParamVisitor._paramValue
private

Definition at line 39 of file HiHelperTools.py.

Referenced by HiHelperTools.MassSearchReplaceParamVisitor.enter().

HiHelperTools.MassSearchReplaceParamVisitor._verbose
private