ATLAS Offline Software
Loading...
Searching...
No Matches
MenuComponents.InputMakerNode Class Reference
Inheritance diagram for MenuComponents.InputMakerNode:
Collaboration diagram for MenuComponents.InputMakerNode:

Public Member Functions

 __init__ (self, Alg)
 setPar (self, propname, value)
 addOutput (self, name)
 readOutputList (self)
 addInput (self, name)
 readInputList (self)
 __repr__ (self)
 getOutputList (self)
 getInputList (self)

Public Attributes

 outputProp = outputProp
 inputProp = inputProp
tuple name = ("%sNode")%( Alg.getName() )
 Alg = Alg
list inputs = []
list outputs = []

Detailed Description

AlgNode for InputMaker Algs

Definition at line 169 of file MenuComponents.py.

Constructor & Destructor Documentation

◆ __init__()

MenuComponents.InputMakerNode.__init__ ( self,
Alg )

Definition at line 171 of file MenuComponents.py.

171 def __init__(self, Alg):
172 assert isInputMakerBase(Alg), "Error in creating InputMakerNode from Alg " + Alg.name
173 AlgNode.__init__(self, Alg, 'InputMakerInputDecisions', 'InputMakerOutputDecisions')
174 input_maker_output = CFNaming.inputMakerOutName(self.Alg.name)
175 self.addOutput(input_maker_output)
176
177

Member Function Documentation

◆ __repr__()

MenuComponents.AlgNode.__repr__ ( self)
inherited

Definition at line 98 of file MenuComponents.py.

98 def __repr__(self):
99 return "Alg::%s [%s] -> [%s]"%(self.Alg.getName(), ' '.join(map(str, self.getInputList())), ' '.join(map(str, self.getOutputList())))
100
101
STL class.

◆ addInput()

MenuComponents.AlgNode.addInput ( self,
name )
inherited

Reimplemented from MenuComponents.Node.

Definition at line 81 of file MenuComponents.py.

81 def addInput(self, name):
82 inputs = self.readInputList()
83 if name in inputs:
84 log.debug("Input DH not added in %s: %s already set!", self.Alg.getName(), name)
85 else:
86 if self.inputProp != '':
87 self.setPar(self.inputProp, name)
88 else:
89 log.debug("no InputProp set for input of %s", self.Alg.getName())
90 Node.addInput(self, name)
91 return len(self.readInputList())
92

◆ addOutput()

MenuComponents.AlgNode.addOutput ( self,
name )
inherited

Reimplemented from MenuComponents.Node.

Reimplemented in MenuComponents.HypoAlgNode.

Definition at line 65 of file MenuComponents.py.

65 def addOutput(self, name):
66 outputs = self.readOutputList()
67 if name in outputs:
68 log.debug("Output DH not added in %s: %s already set!", self.Alg.getName(), name)
69 else:
70 if self.outputProp != '':
71 self.setPar(self.outputProp, name)
72 else:
73 log.debug("no outputProp set for output of %s", self.Alg.getName())
74 Node.addOutput(self, name)
75

◆ getInputList()

MenuComponents.Node.getInputList ( self)
inherited

Definition at line 42 of file MenuComponents.py.

42 def getInputList(self):
43 return self.inputs
44

◆ getOutputList()

MenuComponents.Node.getOutputList ( self)
inherited

Definition at line 39 of file MenuComponents.py.

39 def getOutputList(self):
40 return self.outputs
41

◆ readInputList()

MenuComponents.AlgNode.readInputList ( self)
inherited

Definition at line 93 of file MenuComponents.py.

93 def readInputList(self):
94 cval = getattr(self.Alg, self.inputProp)
95 return (cval if isinstance(cval, MutableSequence) else
96 ([str(cval)] if cval else []))
97

◆ readOutputList()

MenuComponents.AlgNode.readOutputList ( self)
inherited

Definition at line 76 of file MenuComponents.py.

76 def readOutputList(self):
77 cval = getattr(self.Alg, self.outputProp)
78 return (cval if isinstance(cval, MutableSequence) else
79 ([str(cval)] if cval else []))
80

◆ setPar()

MenuComponents.AlgNode.setPar ( self,
propname,
value )
inherited

Definition at line 57 of file MenuComponents.py.

57 def setPar(self, propname, value):
58 cval = getattr( self.Alg, propname)
59 if isinstance(cval, MutableSequence):
60 cval.append(value)
61 return setattr(self.Alg, propname, cval)
62 else:
63 return setattr(self.Alg, propname, value)
64

Member Data Documentation

◆ Alg

MenuComponents.Node.Alg = Alg
inherited

Definition at line 29 of file MenuComponents.py.

◆ inputProp

MenuComponents.AlgNode.inputProp = inputProp
inherited

Definition at line 55 of file MenuComponents.py.

◆ inputs

list MenuComponents.Node.inputs = []
inherited

Definition at line 30 of file MenuComponents.py.

◆ name

tuple MenuComponents.Node.name = ("%sNode")%( Alg.getName() )
inherited

Definition at line 28 of file MenuComponents.py.

◆ outputProp

MenuComponents.AlgNode.outputProp = outputProp
inherited

Definition at line 54 of file MenuComponents.py.

◆ outputs

list MenuComponents.Node.outputs = []
inherited

Definition at line 31 of file MenuComponents.py.


The documentation for this class was generated from the following file: