CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
VarParsing.VarParsing Class Reference
Inheritance diagram for VarParsing.VarParsing:

Public Member Functions

def __getattr__
 
def __init__
 
def __setattr__
 
def __str__
 
def clearList
 
def has_key
 
def help
 
def loadFromFile
 
def parseArguments
 
def register
 
def setDefault
 
def setNoCommaSplit
 
def setNoDefaultClear
 
def setType
 
def setupTags
 

Public Attributes

 inputFiles
 Post-loading processing #. More...
 

Static Public Attributes

tuple commaRE = re.compile(r',')
 
tuple falseRE = re.compile(r'^false$', re.IGNORECASE)
 
tuple multiplicity = Enumerate("singleton list", "multiplicity")
 
tuple trueRE = re.compile(r'^true$', re.IGNORECASE)
 
tuple varType = Enumerate("bool int float string tagString")
 

Private Member Functions

def _convert
 
def _withTags
 

Private Attributes

 _beenSet
 
 _currentlyParsing
 
 _info
 
 _lists
 
 _maxLength
 
 _noCommaSplit
 
 _noDefaultClear
 
 _register
 
 _setDuringParsing
 
 _singletons
 
 _tagOrder
 
 _tags
 
 _types
 

Detailed Description

Infrastructure to parse variable definitions passed to cmsRun
configuration scripts

Definition at line 8 of file VarParsing.py.

Constructor & Destructor Documentation

def VarParsing.VarParsing.__init__ (   self,
  args 
)
Class initializer

Definition at line 20 of file VarParsing.py.

Member Function Documentation

def VarParsing.VarParsing.__getattr__ (   self,
  name,
  noTags = False 
)
Lets user get the info they want with obj.name

Definition at line 598 of file VarParsing.py.

def VarParsing.VarParsing.__setattr__ (   self,
  name,
  value,
  extras 
)
Lets me set internal values, or uses setDefault

Definition at line 588 of file VarParsing.py.

def VarParsing.VarParsing.__str__ (   self)
String form of self

Definition at line 553 of file VarParsing.py.

def VarParsing.VarParsing._convert (   self,
  name,
  inputVal 
)
private
Converts inputVal to the type required by name

Definition at line 502 of file VarParsing.py.

def VarParsing.VarParsing._withTags (   self,
  name 
)
private

Definition at line 523 of file VarParsing.py.

def VarParsing.VarParsing.clearList (   self,
  name 
)
Empties all entries from list

Definition at line 301 of file VarParsing.py.

def VarParsing.VarParsing.has_key (   self,
  key 
)
Returns true if a key is registered

Definition at line 432 of file VarParsing.py.

def VarParsing.VarParsing.help (   self)
Prints out help information and exits

Definition at line 361 of file VarParsing.py.

def VarParsing.VarParsing.loadFromFile (   self,
  name,
  filename 
)
Loads a list from file

Definition at line 339 of file VarParsing.py.

def VarParsing.VarParsing.parseArguments (   self)
Parses command line arguments.  Parsing starts just after
the name of the configuration script.  Parsing will fail if
there is not 'xxxx.py'

Definition at line 164 of file VarParsing.py.

def VarParsing.VarParsing.register (   self,
  name,
  default = "",
  mult = multiplicity.singleton,
  mytype = varType.int,
  info = "",
  kwargs 
)
Register a variable

Definition at line 378 of file VarParsing.py.

Referenced by counter.Counter.__add__().

def VarParsing.VarParsing.setDefault (   self,
  name,
  args 
)
Used to set or change the default of an already registered
name

Definition at line 448 of file VarParsing.py.

def VarParsing.VarParsing.setNoCommaSplit (   self,
  name,
  value = True 
)
Tells lists to not split up values by commas.

Definition at line 327 of file VarParsing.py.

def VarParsing.VarParsing.setNoDefaultClear (   self,
  name,
  value = True 
)
Tells lists to not clear default list values when set from
command line.

Definition at line 314 of file VarParsing.py.

def VarParsing.VarParsing.setType (   self,
  name,
  mytype 
)
Change the type of 'name' to 'mytype'

Definition at line 437 of file VarParsing.py.

def VarParsing.VarParsing.setupTags (   self,
  kwargs 
)
Sets up information for tags for output names

Definition at line 140 of file VarParsing.py.

Member Data Documentation

VarParsing.VarParsing._beenSet
private

Definition at line 26 of file VarParsing.py.

VarParsing.VarParsing._currentlyParsing
private

Definition at line 35 of file VarParsing.py.

VarParsing.VarParsing._info
private

Definition at line 27 of file VarParsing.py.

VarParsing.VarParsing._lists
private

Definition at line 24 of file VarParsing.py.

VarParsing.VarParsing._maxLength
private

Definition at line 29 of file VarParsing.py.

VarParsing.VarParsing._noCommaSplit
private

Definition at line 32 of file VarParsing.py.

VarParsing.VarParsing._noDefaultClear
private

Definition at line 33 of file VarParsing.py.

VarParsing.VarParsing._register
private

Definition at line 25 of file VarParsing.py.

VarParsing.VarParsing._setDuringParsing
private

Definition at line 34 of file VarParsing.py.

VarParsing.VarParsing._singletons
private

Definition at line 23 of file VarParsing.py.

VarParsing.VarParsing._tagOrder
private

Definition at line 31 of file VarParsing.py.

VarParsing.VarParsing._tags
private

Definition at line 30 of file VarParsing.py.

VarParsing.VarParsing._types
private

Definition at line 28 of file VarParsing.py.

tuple VarParsing.VarParsing.commaRE = re.compile(r',')
static

Definition at line 15 of file VarParsing.py.

tuple VarParsing.VarParsing.falseRE = re.compile(r'^false$', re.IGNORECASE)
static

Definition at line 17 of file VarParsing.py.

VarParsing.VarParsing.inputFiles

Post-loading processing #.

sections

Definition at line 260 of file VarParsing.py.

tuple VarParsing.VarParsing.multiplicity = Enumerate("singleton list", "multiplicity")
static

Definition at line 13 of file VarParsing.py.

tuple VarParsing.VarParsing.trueRE = re.compile(r'^true$', re.IGNORECASE)
static

Definition at line 16 of file VarParsing.py.

tuple VarParsing.VarParsing.varType = Enumerate("bool int float string tagString")
static

Definition at line 14 of file VarParsing.py.