CMS 3D CMS Logo

Public Member Functions | Private Attributes | Static Private Attributes

editorTools::UserCodeTool Class Reference

Inherits FWCore::GuiBrowsers::ConfigToolBase::ConfigToolBase.

List of all members.

Public Member Functions

def __call__
def __init__
def dumpPython
def toolCode

Private Attributes

 _comment
 _parameters

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
string _label = "userCode"

Detailed Description

User code tool 

Definition at line 6 of file editorTools.py.


Constructor & Destructor Documentation

def editorTools::UserCodeTool::__init__ (   self)

Definition at line 10 of file editorTools.py.

00011                       :
00012         ConfigToolBase.__init__(self)
00013         self.addParameter(self._defaultParameters,'code','', 'User code modifying the process: e.g. process.maxevents=1')
00014         self._parameters=copy.deepcopy(self._defaultParameters)  
        self._comment = ""

Member Function Documentation

def editorTools::UserCodeTool::__call__ (   self,
  process,
  code 
)

Definition at line 21 of file editorTools.py.

00022                                    :
00023         self.setParameter('code',code)
00024         self.apply(process)
        return self
def editorTools::UserCodeTool::dumpPython (   self)

Definition at line 15 of file editorTools.py.

00016                         :
00017         dumpPython=""
00018         if self._comment!="":
00019             dumpPython = "#"+self._comment+"\n"
00020         dumpPython+=self._parameters['code'].value
        return ("",dumpPython)
def editorTools::UserCodeTool::toolCode (   self,
  process 
)

Definition at line 25 of file editorTools.py.

00026                               :
00027         code=self._parameters['code'].value
00028         exec code
00029 
00030 userCodeTool=UserCodeTool()


Member Data Documentation

Definition at line 10 of file editorTools.py.

tuple editorTools::UserCodeTool::_defaultParameters = dicttypes.SortedKeysDict() [static, private]

Definition at line 9 of file editorTools.py.

string editorTools::UserCodeTool::_label = "userCode" [static, private]

Definition at line 8 of file editorTools.py.

Definition at line 10 of file editorTools.py.