AlgNode for InputMaker Algs
Definition at line 170 of file MenuComponents.py.
◆ __init__()
| MenuComponents.InputMakerNode.__init__ |
( |
| self, |
|
|
| Alg ) |
Definition at line 172 of file MenuComponents.py.
172 def __init__(self, Alg):
173 assert isInputMakerBase(Alg), "Error in creating InputMakerNode from Alg " + Alg.name
174 AlgNode.__init__(self, Alg, 'InputMakerInputDecisions', 'InputMakerOutputDecisions')
175 input_maker_output = CFNaming.inputMakerOutName(self.Alg.name)
176 self.addOutput(input_maker_output)
177
178
◆ __repr__()
| MenuComponents.AlgNode.__repr__ |
( |
| self | ) |
|
|
inherited |
Definition at line 99 of file MenuComponents.py.
99 def __repr__(self):
100 return "Alg::%s [%s] -> [%s]"%(self.Alg.getName(),
' '.join(
map(str, self.getInputList())),
' '.join(
map(str, self.getOutputList())))
101
102
◆ addInput()
| MenuComponents.AlgNode.addInput |
( |
| self, |
|
|
| name ) |
|
inherited |
Reimplemented from MenuComponents.Node.
Definition at line 82 of file MenuComponents.py.
82 def addInput(self, name):
83 inputs = self.readInputList()
84 if name in inputs:
85 log.debug("Input DH not added in %s: %s already set!", self.Alg.getName(), name)
86 else:
87 if self.inputProp != '':
88 self.setPar(self.inputProp, name)
89 else:
90 log.debug("no InputProp set for input of %s", self.Alg.getName())
91 Node.addInput(self, name)
92 return len(self.readInputList())
93
◆ addOutput()
| MenuComponents.AlgNode.addOutput |
( |
| self, |
|
|
| name ) |
|
inherited |
Reimplemented from MenuComponents.Node.
Reimplemented in MenuComponents.HypoAlgNode.
Definition at line 66 of file MenuComponents.py.
66 def addOutput(self, name):
67 outputs = self.readOutputList()
68 if name in outputs:
69 log.debug("Output DH not added in %s: %s already set!", self.Alg.getName(), name)
70 else:
71 if self.outputProp != '':
72 self.setPar(self.outputProp, name)
73 else:
74 log.debug("no outputProp set for output of %s", self.Alg.getName())
75 Node.addOutput(self, name)
76
◆ getInputList()
| MenuComponents.Node.getInputList |
( |
| self | ) |
|
|
inherited |
Definition at line 43 of file MenuComponents.py.
43 def getInputList(self):
44 return self.inputs
45
◆ getOutputList()
| MenuComponents.Node.getOutputList |
( |
| self | ) |
|
|
inherited |
Definition at line 40 of file MenuComponents.py.
40 def getOutputList(self):
41 return self.outputs
42
◆ readInputList()
| MenuComponents.AlgNode.readInputList |
( |
| self | ) |
|
|
inherited |
Definition at line 94 of file MenuComponents.py.
94 def readInputList(self):
95 cval = getattr(self.Alg, self.inputProp)
96 return (cval if isinstance(cval, MutableSequence) else
97 ([str(cval)] if cval else []))
98
◆ readOutputList()
| MenuComponents.AlgNode.readOutputList |
( |
| self | ) |
|
|
inherited |
Definition at line 77 of file MenuComponents.py.
77 def readOutputList(self):
78 cval = getattr(self.Alg, self.outputProp)
79 return (cval if isinstance(cval, MutableSequence) else
80 ([str(cval)] if cval else []))
81
◆ setPar()
| MenuComponents.AlgNode.setPar |
( |
| self, |
|
|
| propname, |
|
|
| value ) |
|
inherited |
Definition at line 58 of file MenuComponents.py.
58 def setPar(self, propname, value):
59 cval = getattr( self.Alg, propname)
60 if isinstance(cval, MutableSequence):
61 cval.append(value)
62 return setattr(self.Alg, propname, cval)
63 else:
64 return setattr(self.Alg, propname, value)
65
◆ Alg
| MenuComponents.Node.Alg = Alg |
|
inherited |
◆ inputProp
| MenuComponents.AlgNode.inputProp = inputProp |
|
inherited |
◆ inputs
| list MenuComponents.Node.inputs = [] |
|
inherited |
◆ name
| tuple MenuComponents.Node.name = ("%sNode")%( Alg.getName() ) |
|
inherited |
◆ outputProp
| MenuComponents.AlgNode.outputProp = outputProp |
|
inherited |
◆ outputs
| list MenuComponents.Node.outputs = [] |
|
inherited |
The documentation for this class was generated from the following file: