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

Constructor & Destructor Documentation

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

Definition at line 104 of file MassReplace.py.

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

Member Function Documentation

def MassReplace.MassSearchReplaceParamVisitor.enter (   self,
  visitee 
)

Definition at line 109 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, ConfigBuilder.ConfigBuilder.MassSearchReplaceProcessNameVisitor._verbose, and edm.print().

109  def enter(self,visitee):
110  if (hasattr(visitee,self._paramName)):
111  if getattr(visitee,self._paramName) == self._paramSearch:
112  if self._verbose:print("Replaced %s.%s: %s => %s" % (visitee,self._paramName,getattr(visitee,self._paramName),self._paramValue))
113  setattr(visitee,self._paramName,self._paramValue)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:65
def MassReplace.MassSearchReplaceParamVisitor.leave (   self,
  visitee 
)

Definition at line 114 of file MassReplace.py.

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

Member Data Documentation

MassReplace.MassSearchReplaceParamVisitor._paramName
private

Definition at line 105 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramSearch
private

Definition at line 107 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._paramValue
private

Definition at line 106 of file MassReplace.py.

Referenced by MassReplace.MassSearchReplaceParamVisitor.enter().

MassReplace.MassSearchReplaceParamVisitor._verbose
private