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

Public Types

typedef HLT::TypeInformation::for_each_type_c< typenameEDMLIST::map, my_functor, my_result<>, my_arg< HLT::TypeInformation::get_cont, CONTAINER > >::type result

Public Member Functions

 __init__ (self, Alg)
 addOutput (self, name)
 addHypoTool (self, flags, hypoToolConf)
 setPreviousDecision (self, prev)
 __repr__ (self)
 setPar (self, propname, value)
 readOutputList (self)
 addInput (self, name)
 readInputList (self)
 getOutputList (self)
 getInputList (self)

Public Attributes

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

Static Public Attributes

str initialOutput = 'StoreGateSvc+UNSPECIFIED_OUTPUT'

Detailed Description

AlgNode for HypoAlgs

Definition at line 124 of file MenuComponents.py.

Member Typedef Documentation

◆ result

Definition at line 90 of file EDM_MasterSearch.h.

Constructor & Destructor Documentation

◆ __init__()

MenuComponents.HypoAlgNode.__init__ ( self,
Alg )

Definition at line 127 of file MenuComponents.py.

127 def __init__(self, Alg):
128 assert isHypoBase(Alg), "Error in creating HypoAlgNode from Alg " + Alg.name
129 AlgNode.__init__(self, Alg, 'HypoInputDecisions', 'HypoOutputDecisions')
130 self.previous=[]
131

Member Function Documentation

◆ __repr__()

MenuComponents.HypoAlgNode.__repr__ ( self)

Definition at line 162 of file MenuComponents.py.

162 def __repr__(self):
163 return "HypoAlg::%s [%s] -> [%s], previous = [%s], HypoTools=[%s]" % \
164 (self.Alg.name,' '.join(map(str, self.getInputList())),
165 ' '.join(map(str, self.getOutputList())),
166 ' '.join(map(str, self.previous)),
167 ' '.join([t.getName() for t in self.Alg.HypoTools]))
168
169
STL class.

◆ addHypoTool()

MenuComponents.HypoAlgNode.addHypoTool ( self,
flags,
hypoToolConf )

Definition at line 142 of file MenuComponents.py.

142 def addHypoTool (self, flags, hypoToolConf):
143 log.debug("Adding HypoTool %s for chain %s to %s", hypoToolConf.name, hypoToolConf.chainDict['chainName'], self.Alg.getName())
144 try:
145 result = hypoToolConf.create(flags)
146 if isinstance(result, ComponentAccumulator):
147 tool = result.popPrivateTools()
148 assert not isinstance(tool, list), "Can not handle list of tools"
149 self.Alg.HypoTools.append(tool)
150 return result
151 else:
152 self.Alg.HypoTools = self.Alg.HypoTools + [result] # see ATEAM-773
153
154 except NoHypoToolCreated as e:
155 log.debug("%s returned empty tool: %s", hypoToolConf.name, e)
156 return None
157

◆ 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.HypoAlgNode.addOutput ( self,
name )

Reimplemented from MenuComponents.AlgNode.

Definition at line 132 of file MenuComponents.py.

132 def addOutput(self, name):
133 outputs = self.readOutputList()
134 if name in outputs:
135 log.debug("Output DH not added in %s: %s already set!", self.name, name)
136 elif self.initialOutput in outputs:
137 AlgNode.addOutput(self, name)
138 else:
139 log.error("Hypo %s has already %s as configured output: you may want to duplicate the Hypo!",
140 self.name, outputs[0])
141

◆ 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

◆ setPreviousDecision()

MenuComponents.HypoAlgNode.setPreviousDecision ( self,
prev )

Definition at line 158 of file MenuComponents.py.

158 def setPreviousDecision(self,prev):
159 self.previous.append(prev)
160 return self.addInput(prev)
161

Member Data Documentation

◆ Alg

MenuComponents.Node.Alg = Alg
inherited

Definition at line 30 of file MenuComponents.py.

◆ initialOutput

str MenuComponents.HypoAlgNode.initialOutput = 'StoreGateSvc+UNSPECIFIED_OUTPUT'
static

Definition at line 126 of file MenuComponents.py.

◆ inputProp

MenuComponents.AlgNode.inputProp = inputProp
inherited

Definition at line 56 of file MenuComponents.py.

◆ inputs

list MenuComponents.Node.inputs = []
inherited

Definition at line 31 of file MenuComponents.py.

◆ name

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

Definition at line 29 of file MenuComponents.py.

◆ outputProp

MenuComponents.AlgNode.outputProp = outputProp
inherited

Definition at line 55 of file MenuComponents.py.

◆ outputs

list MenuComponents.Node.outputs = []
inherited

Definition at line 32 of file MenuComponents.py.

◆ previous

MenuComponents.HypoAlgNode.previous = []

Definition at line 130 of file MenuComponents.py.


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