Definition at line 46 of file ConfigFactory.py.
◆ __init__()
def python.ConfigFactory.FactoryBlock.__init__ |
( |
|
self, |
|
|
|
alg, |
|
|
|
factoryName, |
|
|
|
algName, |
|
|
|
options, |
|
|
|
defaults, |
|
|
|
subAlgs = None |
|
) |
| |
Definition at line 49 of file ConfigFactory.py.
49 def __init__(self, alg, factoryName, algName, options, defaults, subAlgs=None):
51 self.factoryName = factoryName
52 self.algName = algName
53 self.options = options
54 self.defaults = defaults
58 self.subAlgs = subAlgs
◆ makeConfig()
def python.ConfigFactory.FactoryBlock.makeConfig |
( |
|
self, |
|
|
|
funcOptions |
|
) |
| |
Parameters
----------
funcName: str
name associated with the algorithm. This name must have been added to the
list of available algorithms
funcOptions: dict
dictionary containing options for the algorithm read from the YAML file
Returns
-------
configSequence
Definition at line 61 of file ConfigFactory.py.
61 def makeConfig(self, funcOptions):
66 name associated with the algorithm. This name must have been added to the
67 list of available algorithms
69 dictionary containing options for the algorithm read from the YAML file
75 configSeq = ConfigSequence()
78 funcName = self.algName
80 defaults = self.defaults
86 if arg
in funcOptions:
87 args[arg] = funcOptions[arg]
89 elif arg
in funcDefaults:
90 args[arg] = funcDefaults[arg]
92 elif defaults
is not None and arg
in defaults:
93 args[arg] = defaults[arg]
101 raise ValueError(f
"{arg} is required for {funcName}")
102 if inspect.isclass(func):
103 configSeq.append(func(**args))
106 configSeq.setFactoryName(self.factoryName)
107 return configSeq, args.keys()
◆ alg
python.ConfigFactory.FactoryBlock.alg |
◆ algName
python.ConfigFactory.FactoryBlock.algName |
◆ defaults
python.ConfigFactory.FactoryBlock.defaults |
◆ factoryName
python.ConfigFactory.FactoryBlock.factoryName |
◆ options
python.ConfigFactory.FactoryBlock.options |
◆ subAlgs
python.ConfigFactory.FactoryBlock.subAlgs |
The documentation for this class was generated from the following file: