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 9 of file VarParsing.py.
def VarParsing.VarParsing.__init__ | ( | self, | |
args | |||
) |
Class initializer
Definition at line 21 of file VarParsing.py.
def VarParsing.VarParsing.__getattr__ | ( | self, | |
name, | |||
noTags = False |
|||
) |
Lets user get the info they want with obj.name
Definition at line 599 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 589 of file VarParsing.py.
References HcalItemCollById< Item >.setDefault(), and VarParsing.VarParsing.setDefault().
def VarParsing.VarParsing.__str__ | ( | self | ) |
String form of self
Definition at line 554 of file VarParsing.py.
References VarParsing.VarParsing._info, VarParsing.VarParsing._maxLength, and VarParsing.VarParsing._singletons.
|
private |
Converts inputVal to the type required by name
Definition at line 503 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 524 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 302 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 433 of file VarParsing.py.
References VarParsing.VarParsing._register.
def VarParsing.VarParsing.help | ( | self | ) |
Prints out help information and exits
Definition at line 362 of file VarParsing.py.
References print(), and VarParsing.VarParsing.register().
def VarParsing.VarParsing.loadFromFile | ( | self, | |
name, | |||
filename | |||
) |
Loads a list from file
Definition at line 340 of file VarParsing.py.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._lists, VarParsing.VarParsing._register, bitset_utilities.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 165 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, cms::SiPixelCondObjBuilder.loadFromFile(), cms::SiPixelCondObjOfflineBuilder.loadFromFile(), cms::SiPixelCondObjForHLTBuilder.loadFromFile(), VarParsing.VarParsing.loadFromFile(), print(), HcalZDCDetId.section(), edm::DocFormatHelper.section(), HcalCastorDetId.section(), HcalItemCollById< Item >.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 379 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 print().
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 449 of file VarParsing.py.
References VarParsing.VarParsing._convert(), VarParsing.VarParsing._currentlyParsing, VarParsing.VarParsing._lists, VarParsing.VarParsing._register, VarParsing.VarParsing._setDuringParsing, VarParsing.VarParsing._singletons, bitset_utilities.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 328 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 315 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 438 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(), and VarParsing.VarParsing.setDefault().
def VarParsing.VarParsing.setupTags | ( | self, | |
kwargs | |||
) |
Sets up information for tags for output names
Definition at line 141 of file VarParsing.py.
References VarParsing.VarParsing._tags, and print().
|
private |
Definition at line 27 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.register().
|
private |
Definition at line 36 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments(), and VarParsing.VarParsing.setDefault().
|
private |
Definition at line 28 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__str__(), and VarParsing.VarParsing.register().
|
private |
Definition at line 25 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 30 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__str__(), and VarParsing.VarParsing.register().
|
private |
Definition at line 33 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), and VarParsing.VarParsing.setNoCommaSplit().
|
private |
Definition at line 34 of file VarParsing.py.
Referenced by VarParsing.VarParsing.register(), and VarParsing.VarParsing.setNoDefaultClear().
|
private |
Definition at line 26 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 35 of file VarParsing.py.
Referenced by VarParsing.VarParsing.setDefault().
|
private |
Definition at line 24 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 32 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags().
|
private |
Definition at line 31 of file VarParsing.py.
Referenced by VarParsing.VarParsing._withTags(), and VarParsing.VarParsing.setupTags().
|
private |
Definition at line 29 of file VarParsing.py.
Referenced by VarParsing.VarParsing.__getattr__(), VarParsing.VarParsing._convert(), VarParsing.VarParsing.register(), and VarParsing.VarParsing.setType().
|
static |
Definition at line 16 of file VarParsing.py.
|
static |
Definition at line 18 of file VarParsing.py.
VarParsing.VarParsing.inputFiles |
Post-loading processing #.
sections
Definition at line 261 of file VarParsing.py.
Referenced by VarParsing.VarParsing.parseArguments().
|
static |
Definition at line 14 of file VarParsing.py.
|
static |
Definition at line 17 of file VarParsing.py.
|
static |
Definition at line 15 of file VarParsing.py.