|
def | __init__ (self, Alg) |
|
def | addOutput (self, name) |
|
def | addHypoTool (self, flags, hypoToolConf) |
|
def | setPreviousDecision (self, prev) |
|
def | __repr__ (self) |
|
def | addDefaultOutput (self) |
|
def | setPar (self, propname, value) |
|
def | resetPar (self, prop) |
|
def | getPar (self, prop) |
|
def | resetOutput (self) |
|
def | resetInput (self) |
|
def | readOutputList (self) |
|
def | addInput (self, name) |
|
def | readInputList (self) |
|
def | getOutputList (self) |
|
def | getInputList (self) |
|
AlgNode for HypoAlgs
Definition at line 151 of file MenuComponents.py.
◆ __init__()
def MenuComponents.HypoAlgNode.__init__ |
( |
|
self, |
|
|
|
Alg |
|
) |
| |
Reimplemented from MenuComponents.Node.
Definition at line 154 of file MenuComponents.py.
155 assert isHypoBase(Alg),
"Error in creating HypoAlgNode from Alg " + Alg.name
156 AlgNode.__init__(self, Alg,
'HypoInputDecisions',
'HypoOutputDecisions')
◆ __repr__()
def MenuComponents.HypoAlgNode.__repr__ |
( |
|
self | ) |
|
Reimplemented from MenuComponents.AlgNode.
Definition at line 189 of file MenuComponents.py.
190 return "HypoAlg::%s [%s] -> [%s], previous = [%s], HypoTools=[%s]" % \
191 (self.Alg.name,
' '.
join(map(str, self.getInputList())),
192 ' '.
join(map(str, self.getOutputList())),
193 ' '.
join(map(str, self.previous)),
194 ' '.
join([t.getName()
for t
in self.Alg.HypoTools]))
◆ addDefaultOutput()
def MenuComponents.AlgNode.addDefaultOutput |
( |
|
self | ) |
|
|
inherited |
Definition at line 60 of file MenuComponents.py.
60 def addDefaultOutput(self):
61 if self.outputProp !=
'':
62 self.addOutput((
"%s_%s"%(self.Alg.
getName(),self.outputProp)))
◆ addHypoTool()
def MenuComponents.HypoAlgNode.addHypoTool |
( |
|
self, |
|
|
|
flags, |
|
|
|
hypoToolConf |
|
) |
| |
Definition at line 169 of file MenuComponents.py.
169 def addHypoTool (self, flags, hypoToolConf):
170 log.debug(
"Adding HypoTool %s for chain %s to %s", hypoToolConf.name, hypoToolConf.chainDict[
'chainName'], self.Alg.
getName())
172 result = hypoToolConf.create(flags)
173 if isinstance(result, ComponentAccumulator):
174 tool = result.popPrivateTools()
175 assert not isinstance(tool, list),
"Can not handle list of tools"
176 self.Alg.HypoTools.append(tool)
179 self.Alg.HypoTools = self.Alg.HypoTools + [result]
181 except NoHypoToolCreated
as e:
182 log.debug(
"%s returned empty tool: %s", hypoToolConf.name, e)
◆ addInput()
def MenuComponents.AlgNode.addInput |
( |
|
self, |
|
|
|
name |
|
) |
| |
|
inherited |
Reimplemented from MenuComponents.Node.
Definition at line 104 of file MenuComponents.py.
105 inputs = self.readInputList()
107 log.debug(
"Input DH not added in %s: %s already set!", self.Alg.
getName(), name)
109 if self.inputProp !=
'':
110 self.setPar(self.inputProp, name)
112 log.debug(
"no InputProp set for input of %s", self.Alg.
getName())
113 Node.addInput(self, name)
114 return len(self.readInputList())
◆ addOutput()
def MenuComponents.HypoAlgNode.addOutput |
( |
|
self, |
|
|
|
name |
|
) |
| |
Reimplemented from MenuComponents.AlgNode.
Definition at line 159 of file MenuComponents.py.
159 def addOutput(self, name):
160 outputs = self.readOutputList()
162 log.debug(
"Output DH not added in %s: %s already set!", self.name, name)
163 elif self.initialOutput
in outputs:
164 AlgNode.addOutput(self, name)
166 log.error(
"Hypo %s has already %s as configured output: you may want to duplicate the Hypo!",
167 self.name, outputs[0])
◆ getInputList()
def MenuComponents.Node.getInputList |
( |
|
self | ) |
|
|
inherited |
◆ getOutputList()
def MenuComponents.Node.getOutputList |
( |
|
self | ) |
|
|
inherited |
◆ getPar()
def MenuComponents.AlgNode.getPar |
( |
|
self, |
|
|
|
prop |
|
) |
| |
|
inherited |
Definition at line 79 of file MenuComponents.py.
79 def getPar(self, prop):
80 return getattr(self.Alg, prop)
◆ readInputList()
def MenuComponents.AlgNode.readInputList |
( |
|
self | ) |
|
|
inherited |
Definition at line 116 of file MenuComponents.py.
116 def readInputList(self):
117 cval = self.getPar(self.inputProp)
118 return (cval
if isinstance(cval, MutableSequence)
else
119 ([
str(cval)]
if cval
else []))
◆ readOutputList()
def MenuComponents.AlgNode.readOutputList |
( |
|
self | ) |
|
|
inherited |
Definition at line 99 of file MenuComponents.py.
99 def readOutputList(self):
100 cval = self.getPar(self.outputProp)
101 return (cval
if isinstance(cval, MutableSequence)
else
102 ([
str(cval)]
if cval
else []))
◆ resetInput()
def MenuComponents.AlgNode.resetInput |
( |
|
self | ) |
|
|
inherited |
◆ resetOutput()
def MenuComponents.AlgNode.resetOutput |
( |
|
self | ) |
|
|
inherited |
Definition at line 82 of file MenuComponents.py.
82 def resetOutput(self):
83 self.resetPar(self.outputProp)
◆ resetPar()
def MenuComponents.AlgNode.resetPar |
( |
|
self, |
|
|
|
prop |
|
) |
| |
|
inherited |
Definition at line 72 of file MenuComponents.py.
72 def resetPar(self, prop):
73 cval = getattr(self.Alg, prop)
74 if isinstance(cval, MutableSequence):
75 return setattr(self.Alg, prop, [])
77 return setattr(self.Alg, prop,
"")
◆ setPar()
def MenuComponents.AlgNode.setPar |
( |
|
self, |
|
|
|
propname, |
|
|
|
value |
|
) |
| |
|
inherited |
Definition at line 64 of file MenuComponents.py.
64 def setPar(self, propname, value):
65 cval = getattr( self.Alg, propname)
66 if isinstance(cval, MutableSequence):
68 return setattr(self.Alg, propname, cval)
70 return setattr(self.Alg, propname, value)
◆ setPreviousDecision()
def MenuComponents.HypoAlgNode.setPreviousDecision |
( |
|
self, |
|
|
|
prev |
|
) |
| |
Definition at line 185 of file MenuComponents.py.
185 def setPreviousDecision(self,prev):
186 self.previous.
append(prev)
187 return self.addInput(prev)
◆ Alg
◆ initialOutput
MenuComponents.HypoAlgNode.initialOutput |
|
static |
◆ inputProp
MenuComponents.AlgNode.inputProp |
|
inherited |
◆ inputs
MenuComponents.Node.inputs |
|
inherited |
◆ name
◆ outputProp
MenuComponents.AlgNode.outputProp |
|
inherited |
◆ outputs
MenuComponents.Node.outputs |
|
inherited |
◆ previous
MenuComponents.HypoAlgNode.previous |
The documentation for this class was generated from the following file: