Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions py/orbit/lattice/AccNode.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def getNumberOfBodyChildren(self):
nChildren = nChildren + len(arr[0]) + len(arr[1])
return nChildren

def addChildNode(self, node, place, part_index=0, place_in_part=AccActionsContainer.BEFORE):
def addChildNode(self, node, place, part_index=0, place_in_part=AccActionsContainer.AFTER):
"""
Method. Adds a child node to the list defined by place and
(maybe) part index and place in the part (before or after).
Expand All @@ -192,7 +192,10 @@ def addChildNode(self, node, place, part_index=0, place_in_part=AccActionsContai
msg = msg + os.linesep
orbitFinalize(msg)
nodes = self.__childNodesArr[place][part_index][place_in_part]
nodes.append(node)
if(place_in_part == AccActionsContainer.AFTER):
nodes.append(node)
else:
nodes.insert(0, node)

def getChildNodes(self, place, part_index=0, place_in_part=AccActionsContainer.BEFORE):
"""
Expand Down
5 changes: 4 additions & 1 deletion py/orbit/py_linac/lattice/LinacTransportMatrixGenNodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ def addTrMatrixGenNodes(self, accLattice, node_or_nodes, place=MarkerLinacNode.E
# -----------------------------
for node in nodes:
trMatrxGenNode = LinacTrMatrixGenNode(self, node.getName() + ":trMatrx")
node.addChildNode(trMatrxGenNode, place)
if(place == MarkerLinacNode.ENTRANCE):
node.addChildNode(trMatrxGenNode, place, place_in_part = AccActionsContainer.BEFORE)
else:
node.addChildNode(trMatrxGenNode, place, place_in_part = AccActionsContainer.AFTER)
# ----- set up the position of the TrMatrix nodes
actions = AccActionsContainer()

Expand Down