Public Member Functions | |
def | __getattr__ (self, name, noTags=False) |
def | __init__ (self, *args) |
def | __setattr__ (self, name, value, *extras) |
def | __str__ (self) |
def | clearList (self, name) |
def | has_key (self, key) |
def | help (self) |
def | loadFromFile (self, name, filename) |
def | parseArguments (self) |
def | register (self, name, default="", mult=multiplicity.singleton, mytype=varType.int, info="", **kwargs) |
def | setDefault (self, name, *args) |
def | setNoCommaSplit (self, name, value=True) |
def | setNoDefaultClear (self, name, value=True) |
def | setType (self, name, mytype) |
def | setupTags (self, **kwargs) |
Public Attributes | |
inputFiles | |
Post-loading processing #. More... | |
Static Public Attributes | |
commaRE | |
falseRE | |
multiplicity | |
trueRE | |
varType | |
Private Member Functions | |
def | _convert (self, name, inputVal) |
def | _withTags (self, name) |
Private Attributes | |
_beenSet | |
_currentlyParsing | |
_info | |
_lists | |
_maxLength | |
_noCommaSplit | |
_noDefaultClear | |
_register | |
_setDuringParsing | |
_singletons | |
_tagOrder | |
_tags | |
_types | |
Infrastructure to parse variable definitions passed to cmsRun configuration scripts
Definition at line 10 of file VarParsing.py.
def VarParsing.VarParsing.__init__ | ( | self, | |
* | args | ||
) |
def VarParsing.VarParsing.__getattr__ | ( | self, | |
name, | |||
noTags = False |
|||
) |
Lets user get the info they want with obj.name
Definition at line 600 of file VarParsing.py.
References VarParsing.VarParsing._lists, VarParsing.VarParsing._register, VarParsing.VarParsing._singletons, VarParsing.VarParsing._types, TreeCrawler.mymf._types, hcaldqm::quantity::EventType._types, VarParsing.VarParsing._withTags(), and print().
Referenced by VarParsing.VarParsing.setType().
def VarParsing.VarParsing.__setattr__ | ( | self, | |
name, | |||
value, | |||
* | extras | ||
) |
Lets me set internal values, or uses setDefault
Definition at line 590 of file VarParsing.py.
References HcalItemCollById< Item >.setDefault(), HcalItemArrayCollById< Item, N >.setDefault(), and VarParsing.VarParsing.setDefault().
Referenced by GenObject.GenObject.setValue().
def VarParsing.VarParsing.__str__ | ( | self | ) |
String form of self
Definition at line 555 of file VarParsing.py.
References VarParsing.VarParsing._info, VarParsing.VarParsing._lists, VarParsing.VarParsing._maxLength, and VarParsing.VarParsing._singletons.
|
private |
Converts inputVal to the type required by name
Definition at line 504 of file VarParsing.py.
References VarParsing.VarParsing._types, TreeCrawler.mymf._types, and hcaldqm::quantity::EventType._types.
Referenced by VarParsing.VarParsing.loadFromFile(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 525 of file VarParsing.py.
References VarParsing.VarParsing._register, VarParsing.VarParsing._singletons, VarParsing.VarParsing._tagOrder, VarParsing.VarParsing._tags, and print().
Referenced by VarParsing.VarParsing.__getattr__().
def VarParsing.VarParsing.clearList | ( | self, | |
name | |||
) |
Empties all entries from list
Definition at line 303 of file VarParsing.py.
References VarParsing.VarParsing._lists, VarParsing.VarParsing._register, and print().
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setDefault().
def VarParsing.VarParsing.has_key | ( | self, | |
key | |||
) |
Returns true if a key is registered
Definition at line 434 of file VarParsing.py.
References VarParsing.VarParsing._register.
def VarParsing.VarParsing.help | ( | self | ) |
Prints out help information and exits
Definition at line 363 of file VarParsing.py.
References print().
def VarParsing.VarParsing.loadFromFile | ( | self, | |
name, | |||
filename | |||
) |
Loads a list from file
Definition at line 341 of file VarParsing.py.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._lists, VarParsing.VarParsing._register, mps_setup.append, and print().
Referenced by VarParsing.VarParsing.parseArguments().
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 166 of file VarParsing.py.
References VarParsing.VarParsing._beenSet, VarParsing.VarParsing._currentlyParsing, VarParsing.VarParsing._register, VarParsing.VarParsing.clearList(), sistrip::EnsembleCalibrationLA.inputFiles, sistrip::MeasureLA.inputFiles, VarParsing.VarParsing.inputFiles, VarParsing.VarParsing.loadFromFile(), print(), HcalZDCDetId.section(), edm::DocFormatHelper.section(), HcalCastorDetId.section(), HcalItemCollById< Item >.setDefault(), HcalItemArrayCollById< Item, N >.setDefault(), and VarParsing.VarParsing.setDefault().
def VarParsing.VarParsing.register | ( | self, | |
name, | |||
default = "" , |
|||
mult = multiplicity.singleton , |
|||
mytype = varType.int , |
|||
info = "" , |
|||
** | kwargs | ||
) |
Register a variable
Definition at line 375 of file VarParsing.py.
References VarParsing.VarParsing._beenSet, VarParsing.VarParsing._info, VarParsing.VarParsing._lists, VarParsing.VarParsing._maxLength, VarParsing.VarParsing._noCommaSplit, VarParsing.VarParsing._noDefaultClear, VarParsing.VarParsing._register, VarParsing.VarParsing._singletons, VarParsing.VarParsing._types, TreeCrawler.mymf._types, hcaldqm::quantity::EventType._types, electrons_cff.bool, and print().
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 450 of file VarParsing.py.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._currentlyParsing, VarParsing.VarParsing._lists, VarParsing.VarParsing._noCommaSplit, VarParsing.VarParsing._noDefaultClear, VarParsing.VarParsing._register, VarParsing.VarParsing._setDuringParsing, VarParsing.VarParsing._singletons, mps_setup.append, VarParsing.VarParsing.clearList(), and print().
Referenced by VarParsing.VarParsing.__setattr__(), VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setType().
def VarParsing.VarParsing.setNoCommaSplit | ( | self, | |
name, | |||
value = True |
|||
) |
Tells lists to not split up values by commas.
Definition at line 329 of file VarParsing.py.
References VarParsing.VarParsing._noCommaSplit, VarParsing.VarParsing._register, and print().
def VarParsing.VarParsing.setNoDefaultClear | ( | self, | |
name, | |||
value = True |
|||
) |
Tells lists to not clear default list values when set from command line.
Definition at line 316 of file VarParsing.py.
References VarParsing.VarParsing._noDefaultClear, VarParsing.VarParsing._register, and print().
def VarParsing.VarParsing.setType | ( | self, | |
name, | |||
mytype | |||
) |
Change the type of 'name' to 'mytype'
Definition at line 439 of file VarParsing.py.
References Types._Untracked.__getattr__(), Types._ProxyParameter.__getattr__(), Types._ProxyParameterFactory.__getattr__(), BeautifulSoup.NavigableString.__getattr__(), VarParsing.VarParsing.__getattr__(), BeautifulSoup.Tag.__getattr__(), BeautifulSoup.BeautifulStoneSoup.__getattr__(), Config.FilteredStream.__getattr__(), VarParsing.VarParsing._types, TreeCrawler.mymf._types, hcaldqm::quantity::EventType._types, print(), HcalItemCollById< Item >.setDefault(), HcalItemArrayCollById< Item, N >.setDefault(), and VarParsing.VarParsing.setDefault().
def VarParsing.VarParsing.setupTags | ( | self, | |
** | kwargs | ||
) |
Sets up information for tags for output names
Definition at line 142 of file VarParsing.py.
References VarParsing.VarParsing._tagOrder, VarParsing.VarParsing._tags, and print().
|
private |
Definition at line 28 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.register().
|
private |
Definition at line 37 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 29 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__str__(), and VarParsing.VarParsing.register().
|
private |
Definition at line 26 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing.__str__(), VarParsing.VarParsing.clearList(), VarParsing.VarParsing.loadFromFile(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 31 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__str__(), and VarParsing.VarParsing.register().
|
private |
Definition at line 34 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), VarParsing.VarParsing.setDefault(), and VarParsing.VarParsing.setNoCommaSplit().
|
private |
Definition at line 35 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), VarParsing.VarParsing.setDefault(), and VarParsing.VarParsing.setNoDefaultClear().
|
private |
Definition at line 27 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._withTags(), VarParsing.VarParsing.clearList(), VarParsing.VarParsing.has_key(), VarParsing.VarParsing.loadFromFile(), VarParsing.VarParsing.parseArguments(), VarParsing.VarParsing.register(), VarParsing.VarParsing.setDefault(), VarParsing.VarParsing.setNoCommaSplit(), and VarParsing.VarParsing.setNoDefaultClear().
|
private |
Definition at line 36 of file VarParsing.py.
Referenced by VarParsing.VarParsing.setDefault().
|
private |
Definition at line 25 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing.__str__(), VarParsing.VarParsing._withTags(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 33 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags(), and VarParsing.VarParsing.setupTags().
|
private |
Definition at line 32 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags(), and VarParsing.VarParsing.setupTags().
|
private |
Definition at line 30 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._convert(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setType().
|
static |
Definition at line 17 of file VarParsing.py.
|
static |
Definition at line 19 of file VarParsing.py.
VarParsing.VarParsing.inputFiles |
Post-loading processing #.
sections
Definition at line 262 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments().
|
static |
Definition at line 15 of file VarParsing.py.
|
static |
Definition at line 18 of file VarParsing.py.
|
static |
Definition at line 16 of file VarParsing.py.