CMS 3D CMS Logo

Public Member Functions | Private Attributes

HiHelperTools::MassSearchReplaceParamVisitor Class Reference

List of all members.

Public Member Functions

def __init__
def enter
def leave

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.

00038                                                                      :
00039         self._paramName   = paramName
00040         self._paramValue  = paramValue
00041         self._paramSearch = paramSearch
        self._verbose = verbose

Member Function Documentation

def HiHelperTools::MassSearchReplaceParamVisitor::enter (   self,
  visitee 
)

Definition at line 42 of file HiHelperTools.py.

00043                            :
00044         if (hasattr(visitee,self._paramName)):
00045             if getattr(visitee,self._paramName) == self._paramSearch:
00046                 if self._verbose:print "Replaced %s.%s: %s => %s" % (visitee,self._paramName,getattr(visitee,self._paramName),self._paramValue)
                setattr(visitee,self._paramName,self._paramValue)
def HiHelperTools::MassSearchReplaceParamVisitor::leave (   self,
  visitee 
)

Definition at line 47 of file HiHelperTools.py.

00048                            :
00049         pass


Member Data Documentation

Definition at line 37 of file HiHelperTools.py.

Definition at line 37 of file HiHelperTools.py.

Definition at line 37 of file HiHelperTools.py.

Definition at line 37 of file HiHelperTools.py.