CMS 3D CMS Logo

helpers::MassSearchReplaceParamVisitor Class Reference

List of all members.

Public Member Functions

def __init__
def enter
def leave

Private Attributes

 _paramName
 _paramSearch
 _paramValue


Detailed Description

Helpers to perform some technically boring tasks like looking for all modules with a given parameter and replacing that to a given value
Visitor that travels within a cms.Sequence, looks for a parameter and replace its value

Definition at line 6 of file helpers.py.


Member Function Documentation

def helpers::MassSearchReplaceParamVisitor::__init__ (   self,
  paramName,
  paramSearch,
  paramValue 
)

Definition at line 8 of file helpers.py.

00008                                                        :
00009         self._paramName   = paramName
00010         self._paramValue  = paramValue
00011         self._paramSearch = paramSearch
    def enter(self,visitee):

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

Definition at line 12 of file helpers.py.

00012                            :
00013         if (hasattr(visitee,self._paramName)):
00014             if getattr(visitee,self._paramName) == self._paramSearch:
00015                 print "Replaced %s.%s: %s => %s" % (visitee,self._paramName,getattr(visitee,self._paramName),self._paramValue)
00016                 setattr(visitee,self._paramName,self._paramValue)
    def leave(self,visitee):

def helpers::MassSearchReplaceParamVisitor::leave (   self,
  visitee 
)

Definition at line 17 of file helpers.py.


Member Data Documentation

helpers::MassSearchReplaceParamVisitor::_paramName [private]

Definition at line 9 of file helpers.py.

helpers::MassSearchReplaceParamVisitor::_paramSearch [private]

Definition at line 11 of file helpers.py.

helpers::MassSearchReplaceParamVisitor::_paramValue [private]

Definition at line 10 of file helpers.py.


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:47:30 2009 for CMSSW by  doxygen 1.5.4