Public Member Functions | |
def | __init__ (self, randService) |
def | countSeeds (self) |
def | getNamedSeed (self, psetName) |
def | insertSeeds (self, *seeds) |
def | populate (self, *excludePSets) |
def | resetSeeds (self, value) |
def | setNamedSeed (self, psetName, *seeds) |
Private Member Functions | |
def | __containsSeed (self, psetInstance) |
def | __psetsWithSeeds (self) |
Private Attributes | |
_lockedSeeds | |
_randService | |
_RandomNumberServiceHelper_ Helper class to hold and handle the Random number generator service. Provide both user level and WM APIs. Author: Dave Evans Modified: Eric Vaandering
Definition at line 9 of file RandomServiceHelper.py.
def RandomServiceHelper.RandomNumberServiceHelper.__init__ | ( | self, | |
randService | |||
) |
Definition at line 21 of file RandomServiceHelper.py.
|
private |
_keeper_ True/False if the psetInstance has seeds in it
Definition at line 26 of file RandomServiceHelper.py.
Referenced by RandomServiceHelper.RandomNumberServiceHelper.__psetsWithSeeds().
|
private |
_psetsWithSeeds_ *private method* return the list of PSet instances with seeds in them
Definition at line 46 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper.__containsSeed(), RandomServiceHelper.RandomNumberServiceHelper._lockedSeeds, RandomServiceHelper.RandomNumberServiceHelper._randService, and ALCARECOTkAlBeamHalo_cff.filter.
Referenced by RandomServiceHelper.RandomNumberServiceHelper.countSeeds(), and RandomServiceHelper.RandomNumberServiceHelper.insertSeeds().
def RandomServiceHelper.RandomNumberServiceHelper.countSeeds | ( | self | ) |
_countSeeds_ Count the number of seeds required by this service by summing up the initialSeed and initialSeedSet entries in all PSets in the service that contain those parameters.
Definition at line 64 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper.__psetsWithSeeds().
Referenced by RandomServiceHelper.RandomNumberServiceHelper.insertSeeds(), RandomServiceHelper.RandomNumberServiceHelper.populate(), and RandomServiceHelper.RandomNumberServiceHelper.resetSeeds().
def RandomServiceHelper.RandomNumberServiceHelper.getNamedSeed | ( | self, | |
psetName | |||
) |
_getNamedSeed_ This method returns the seeds in a PSet in this service. Returned - *psetName* : Name of the pset containing the seeds
Definition at line 138 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper._randService.
def RandomServiceHelper.RandomNumberServiceHelper.insertSeeds | ( | self, | |
* | seeds | ||
) |
_insertSeeds_ Given some list of specific seeds, insert them into the service. Length of seed list is required to be same as the seed count for the service. Usage: WM Tools.
Definition at line 163 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper.__psetsWithSeeds(), and RandomServiceHelper.RandomNumberServiceHelper.countSeeds().
Referenced by RandomServiceHelper.RandomNumberServiceHelper.populate(), and RandomServiceHelper.RandomNumberServiceHelper.resetSeeds().
def RandomServiceHelper.RandomNumberServiceHelper.populate | ( | self, | |
* | excludePSets | ||
) |
_populate_ generate a bunch of seeds and stick them into this service This is the lazy user method. Optional args are names of PSets to *NOT* alter seeds. Eg: populate() will set all seeds populate("pset1", "pset2") will set all seeds but not those in psets named pset1 and pset2
Definition at line 201 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper._lockedSeeds, RandomServiceHelper.RandomNumberServiceHelper.countSeeds(), RandomServiceHelper.RandomNumberServiceHelper.insertSeeds(), and FastTimerService_cff.range.
def RandomServiceHelper.RandomNumberServiceHelper.resetSeeds | ( | self, | |
value | |||
) |
_resetSeeds_ reset all seeds to given value
Definition at line 235 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper.countSeeds(), RandomServiceHelper.RandomNumberServiceHelper.insertSeeds(), and FastTimerService_cff.range.
def RandomServiceHelper.RandomNumberServiceHelper.setNamedSeed | ( | self, | |
psetName, | |||
* | seeds | ||
) |
_setNamedSeed_ If a specific set of seeds is needed for a PSet in this service, they can be set by name using this method. - *psetName* : Name of the pset containing the seeds - *seeds* : list of seeds to be added, should be a single seed for initialSeed values.
Definition at line 96 of file RandomServiceHelper.py.
References RandomServiceHelper.RandomNumberServiceHelper._randService.
|
private |
Definition at line 23 of file RandomServiceHelper.py.
Referenced by RandomServiceHelper.RandomNumberServiceHelper.__psetsWithSeeds(), and RandomServiceHelper.RandomNumberServiceHelper.populate().
|
private |
Definition at line 22 of file RandomServiceHelper.py.
Referenced by RandomServiceHelper.RandomNumberServiceHelper.__psetsWithSeeds(), RandomServiceHelper.RandomNumberServiceHelper.getNamedSeed(), and RandomServiceHelper.RandomNumberServiceHelper.setNamedSeed().