AccLattice#
- class orbit.lattice.AccLattice(name='no name')[source]#
Bases:
orbit.utils.NamedObject.NamedObject,orbit.utils.TypedObject.TypedObjectClass. The accelerator lattice class contains child nodes.
Attributes Summary
Methods Summary
addNode(node[, index])Method.
Method.
getNodeForName(name)Method.
getNodeIndex(node)Method.
Method.
getNodes()Method.
getNodesForName(name)Method.
getNodesForSubstring(sub[, no_sub])Method.
getNodesOfClass(class_of_node)Method.
getSubLattice([index_start, index_stop])It returns the sub-accelerator lattice with children with indexes between index_start and index_stop inclusive.
Method.
Method.
This method is used for a lattice reversal and a bunch backtracking.
setNodes(childrenNodes)Method.
Returns the text with the lattice structure.
trackActions(actionsContainer[, paramsDict, ...])Method.
Attributes Documentation
- AFTER = 1#
- BEFORE = 0#
- BODY = 1#
- ENTRANCE = 0#
- EXIT = 2#
Methods Documentation
- addNode(node, index=- 1)[source]#
Method. Adds a child node into the lattice. If the user specifies the index >= 0 the element will be inserted in the specified position into the children array
- getNodeIndex(node)[source]#
Method. Returns the index of the node in the upper level of the lattice children-nodes.
- getNodePositionsDict()[source]#
Method. Returns a dictionary of {node:(start position, stop position)} tuples for all children of the first level in the lattice.
- getNodesForSubstring(sub, no_sub=None)[source]#
Method. Returns nodes with names each of them has the certain substring. It is also possible to specify the unwanted substring as no_sub parameter.
- getSubLattice(index_start=- 1, index_stop=- 1)[source]#
It returns the sub-accelerator lattice with children with indexes between index_start and index_stop inclusive. The subclasses of AccLattice should override this method to replace AccLattice() constructor by the sub-class type constructor
- reverseOrder()[source]#
This method is used for a lattice reversal and a bunch backtracking. This method will reverse the order of the children nodes. It will apply the reverse recursively to the all children nodes.