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 | |
Infrastructure to parse variable definitions passed to cmsRun configuration scripts
Definition at line 8 of file VarParsing.py.
def VarParsing.VarParsing.__init__ | ( | self, | |
args | |||
) |
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, 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 VarParsing.VarParsing.setDefault().
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, and TreeCrawler.mymf._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 | |||
) |
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 python.multivaluedict.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, DTCalibrationWorker.DTCalibrationWorker.inputFiles, sistrip::MeasureLA.inputFiles, VarParsing.VarParsing.inputFiles, VarParsing.VarParsing.loadFromFile(), HcalZDCDetId.section(), edm::DocFormatHelper.section(), HcalCastorDetId.section(), 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, and TreeCrawler.mymf._types.
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, python.multivaluedict.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__(), python.Node.Node.__getattr__(), Vispa.Share.BasicDataAccessor.BasicDataAccessorInterface.__getattr__(), BeautifulSoup.NavigableString.__getattr__(), VarParsing.VarParsing.__getattr__(), BeautifulSoup.Tag.__getattr__(), Config.FilteredStream.__getattr__(), BeautifulSoup.BeautifulStoneSoup.__getattr__(), VarParsing.VarParsing._types, TreeCrawler.mymf._types, 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.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().
|
static |
Definition at line 15 of file VarParsing.py.
|
static |
Definition at line 17 of file VarParsing.py.
VarParsing.VarParsing.inputFiles |
Post-loading processing #.
sections
Definition at line 260 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments().
|
static |
Definition at line 13 of file VarParsing.py.
|
static |
Definition at line 16 of file VarParsing.py.
|
static |
Definition at line 14 of file VarParsing.py.