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... | |
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 8 of file VarParsing.py.
def VarParsing.VarParsing.__init__ | ( | self, | |
args | |||
) |
Class initializer
Definition at line 20 of file VarParsing.py.
Lets user get the info they want with obj.name
Definition at line 598 of file VarParsing.py.
References VarParsing.VarParsing._lists, VarParsing.VarParsing._register, VarParsing.VarParsing._singletons, VarParsing.VarParsing._types, TreeCrawler.mymf._types, hcaldqm::quantity::EventType._types, and VarParsing.VarParsing._withTags().
Referenced by VarParsing.VarParsing.setType().
def VarParsing.VarParsing.__setattr__ | ( | self, | |
name, | |||
value, | |||
extras | |||
) |
Lets me set internal values, or uses setDefault
Definition at line 588 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 553 of file VarParsing.py.
References VarParsing.VarParsing._info, and VarParsing.VarParsing._maxLength.
|
private |
Converts inputVal to the type required by name
Definition at line 502 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 523 of file VarParsing.py.
References VarParsing.VarParsing._register, VarParsing.VarParsing._singletons, VarParsing.VarParsing._tagOrder, and VarParsing.VarParsing._tags.
Referenced by VarParsing.VarParsing.__getattr__().
def VarParsing.VarParsing.clearList | ( | self, | |
name | |||
) |
Empties all entries from list
Definition at line 301 of file VarParsing.py.
References VarParsing.VarParsing._lists, and VarParsing.VarParsing._register.
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 432 of file VarParsing.py.
References VarParsing.VarParsing._register.
def VarParsing.VarParsing.help | ( | self | ) |
Prints out help information and exits
Definition at line 361 of file VarParsing.py.
References VarParsing.VarParsing.register().
def VarParsing.VarParsing.loadFromFile | ( | self, | |
name, | |||
filename | |||
) |
Loads a list from file
Definition at line 339 of file VarParsing.py.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._lists, VarParsing.VarParsing._register, and mps_setup.append.
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 164 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(), 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 378 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, and electrons_cff.bool.
Referenced by counter.Counter.__add__(), and VarParsing.VarParsing.help().
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.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._currentlyParsing, VarParsing.VarParsing._lists, VarParsing.VarParsing._register, VarParsing.VarParsing._setDuringParsing, VarParsing.VarParsing._singletons, mps_setup.append, and VarParsing.VarParsing.clearList().
Referenced by VarParsing.VarParsing.__setattr__(), VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setType().
Tells lists to not split up values by commas.
Definition at line 327 of file VarParsing.py.
References VarParsing.VarParsing._noCommaSplit, and VarParsing.VarParsing._register.
Tells lists to not clear default list values when set from command line.
Definition at line 314 of file VarParsing.py.
References VarParsing.VarParsing._noDefaultClear, and VarParsing.VarParsing._register.
def VarParsing.VarParsing.setType | ( | self, | |
name, | |||
mytype | |||
) |
Change the type of 'name' to 'mytype'
Definition at line 437 of file VarParsing.py.
References Types._Untracked.__getattr__(), Vispa.Share.BasicDataAccessor.BasicDataAccessorInterface.__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, 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 140 of file VarParsing.py.
References VarParsing.VarParsing._tags.
|
private |
Definition at line 26 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.register().
|
private |
Definition at line 35 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 27 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__str__(), and VarParsing.VarParsing.register().
|
private |
Definition at line 24 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing.clearList(), VarParsing.VarParsing.loadFromFile(), VarParsing.VarParsing.register(), 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 32 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), and VarParsing.VarParsing.setNoCommaSplit().
|
private |
Definition at line 33 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), and VarParsing.VarParsing.setNoDefaultClear().
|
private |
Definition at line 25 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 34 of file VarParsing.py.
Referenced by VarParsing.VarParsing.setDefault().
|
private |
Definition at line 23 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._withTags(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 31 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags().
|
private |
Definition at line 30 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags(), and VarParsing.VarParsing.setupTags().
|
private |
Definition at line 28 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._convert(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setType().
VarParsing.VarParsing.inputFiles |
Post-loading processing #.
sections
Definition at line 260 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments().