Public Member Functions | |
def | __init__ |
def | get |
def | has |
def | pset |
def | __init__ |
def | get |
def | has |
def | pset |
Public Attributes | |
config | |
Static Private Attributes | |
__call__ = get | |
Provides more user-friendly interface for the configuration access. While FHiCL C++ interface is friendly enough, some of that is lost in Python bindings. This helper class keeps a reference to the FHiCL configuration object, and provides some `get()` overloads to make the interface easier.
Definition at line 337 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.__init__ | ( | self, | |
config | |||
) |
Definition at line 347 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.__init__ | ( | self, | |
config | |||
) |
Definition at line 245 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.get | ( | self, | |
key, | |||
default = None , |
|||
klass = None |
|||
) |
Returns the value associated with the specified key. Parameters ----------- key _(string)_ the key of the configuration parameter to be read default the value to provide if no key is present; if default is `None`, no default is present and if key is missing a `KeyError` exception will be raised klass _(class type)_ type of object returned (if `None`, it's taken from `default` if specified) Returns -------- An object of type `klass`, initialised with the value associated to `key` or with `default`. Raises ------- `KeyError` if the `key` is not present in the configuration and `default` is specified as `None`.
Definition at line 247 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.get | ( | self, | |
key, | |||
default = None , |
|||
klass = None |
|||
) |
Returns the value associated with the specified key. Parameters ----------- key _(string)_ the key of the configuration parameter to be read default the value to provide if no key is present; if default is `None`, no default is present and if key is missing a `KeyError` exception will be raised klass _(class type)_ type of object returned (if `None`, it's taken from `default` if specified) Returns -------- An object of type `klass`, initialised with the value associated to `key` or with `default`. Raises ------- `KeyError` if the `key` is not present in the configuration and `default` is specified as `None`.
Definition at line 349 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.has | ( | self, | |
key | |||
) |
Returns whether there is a value associated with the specified key. Parameters ----------- key _(string)_ the key of the configuration parameter to be read
Definition at line 288 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.has | ( | self, | |
key | |||
) |
Returns whether there is a value associated with the specified key. Parameters ----------- key _(string)_ the key of the configuration parameter to be read
Definition at line 390 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.pset | ( | self | ) |
Definition at line 304 of file sbndcode/sbndcode/gallery/python/galleryUtils.py.
def galleryUtils.ConfigurationHelper.pset | ( | self | ) |
Definition at line 406 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
|
staticprivate |
Definition at line 404 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.
galleryUtils.ConfigurationHelper.config |
Definition at line 348 of file icarusalg/icarusalg/gallery/helpers/python/galleryUtils.py.