FormatterFactory¶
-
class
lsst.daf.butler.FormatterFactory¶ Bases:
objectFactory for
Formatterinstances.Methods Summary
getFormatter(storageClass[, datasetType])Get a new formatter instance. registerFormatter(type_, formatter)Register a Formatter.Methods Documentation
-
getFormatter(storageClass, datasetType=None)¶ Get a new formatter instance.
Parameters: - storageClass :
StorageClass Get
Formatterassociated with thisStorageClass, unless.- datasetType :
DatasetTypeorstr, optional If given, look if an override has been specified for this
DatasetTypeand, if so return that instead.
- storageClass :
-
registerFormatter(type_, formatter)¶ Register a
Formatter.Parameters: - type_ :
strorStorageClassorDatasetType Type for which this formatter is to be used.
- formatter :
str Identifies a
Formattersubclass to use for reading and writing Datasets of this type.
Raises: - ValueError
If formatter does not name a valid formatter type.
- type_ :
-