Package xal.smf
Class AcceleratorSeqCombo
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.AcceleratorSeq
xal.smf.AcceleratorSeqCombo
- All Implemented Interfaces:
Comparable,ElementType,DataListener
- Direct Known Subclasses:
Ring
The implementation of the accelerator combo sequence, This class is meant to
deal with pasting together existing sequences into new sequences.
- Author:
- J. Galambos
-
Field Summary
FieldsFields inherited from class xal.smf.AcceleratorSeq
arrNodes, bucSequence, nodeTable, sequences -
Constructor Summary
ConstructorsConstructorDescriptionAcceleratorSeqCombo(String strID, List<AcceleratorSeq> seqs) Primary constructorAcceleratorSeqCombo(String strID, Accelerator accelerator, DataAdaptor adaptor) Constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleanOverride the equals method to return true if and only if the two combo sequences have equal IDs, are both combo sequences and have equal constituents.Get all nodes including this sequence and constituent sequences and all of their children.Fetch all nodes looking deeply through nested child sequences.Get all nodes in the specified sequence and gets the aperture bucket values.Get the constituent sequences looking deeply even if the combo sequences are nested in many layers.getBaseConstituentsWithQualifier(TypeQualifier qualifier) Get the constituent sequences looking deeply even if the combo sequences are nested in many layers.gets the list of the names of the constituent sequencesGet the constituent sequences.getConstituentsWithQualifier(TypeQualifier qualifier) Get the constituent sequences that are matched by the qualifier.Get the ID of the first base constituent sequence of this combo sequence.static AcceleratorSeqCombogetInstance(String strID, List<AcceleratorSeq> sequences) Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.static AcceleratorSeqCombogetInstance(String strID, Accelerator accelerator, DataAdaptor adaptor) Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.static AcceleratorSeqCombogetInstance(Accelerator accelerator, DataAdaptor adaptor) Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.static AcceleratorSeqCombogetInstanceForRange(String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence) Get an instance of a non-cycling combo sequence which starts and ends between the specified sequences inclusively.static List<AcceleratorSeqCombo>getInstancesForRange(String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence) Get the list of all non-cycling combo sequences which start and end between the specified sequences inclusively.doubleoverride the total length for this combo sequencegetNodes()Shallow fetch of nodes.getNodeWithId(String label) Search deeply for and get the node with the specified id.doublegetPosition(AcceleratorNode node) get the position of a node in the sequence, including the extra length of the sequence starting position itself Note: this way could also be done in the parent AcceleratorSeq class, be we choose to use a more efficient scheme there, specific to primary sequences.Shallow fetch of sequences.protected static List<AcceleratorSeq>getSequences(Accelerator accelerator, DataAdaptor adaptor) Get the sequences in the accelerator which are referenced in the adaptor.getType()Override to identify this sequence as a combo sequenceinthashCode()Override hashCode() as required when overriding equals()voidwrite(DataAdaptor adaptor) Write this sequence's definition to a data adaptor.Methods inherited from class xal.smf.AcceleratorSeq
addBucket, addNode, addNodeAt, addSequenceChain, addSoft, appendNodesOfClassWithQualifier, appendNodesWithQualifier, canPrecede, contains, dataLabel, filterNodesByClass, filterNodesByStatus, formsRing, getAllInclusiveNodes, getAllInclusiveNodesWithQualifier, getAllNodes, getAllNodesOfType, getAllNodesWithQualifier, getAllSeqs, getAperProfile, getDistanceBetween, getIndexOfNode, getLeaves, getNodeAt, getNodeCount, getNodes, getNodesOfClassWithQualifier, getNodesOfClassWithQualifier, getNodesOfClassWithStatus, getNodesOfType, getNodesOfType, getNodesWithQualifier, getNodesWithQualifier, getPredecessors, getPrimaryAncestor, getRelativePosition, getRelativePosition, getSequence, getSequenceBuc, getSequences, getShortestRelativePosition, indexToAddNode, isLinear, orderSequences, recurNodeSearch, recurSeqSearch, removeAllNodes, removeNode, setSequence, sortNodes, sortNodesByProximity, sortNodesByRelativePosition, update, writeAttributes, writeDeeply, writeStatusMethods inherited from class xal.smf.AcceleratorNode
batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, findChannel, getAccelerator, getAccessibleProperties, getAccessibleProperties, getAlign, getAllChannels, getAndConnectChannel, getAndConnectChannelSetAndReadback, getAper, getBucket, getBuckets, getChannel, getDefaultHandles, getDesignPropertyValue, getEId, getHandles, getId, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getProperties, getReadbackHandles, getRollAngle, getSDisplay, getSetHandle, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isChannelSettable, isKindOf, isMagnet, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setDesignPropertyValue, setLength, setLivePropertyValue, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setValueAndVerify, setXOffset, setYawAngle, setYOffset, setZOffset, toString
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
AcceleratorSeqCombo
Primary constructor -
AcceleratorSeqCombo
Constructor
-
-
Method Details
-
getInstance
Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.- Parameters:
strID- The identifier of the new combo sequencesequences- The sequences to flatten into a combo sequence- Returns:
- a new AcceleratorSeqCombo instance if the sequences do not form a ring and a Ring if they do
-
getInstance
public static AcceleratorSeqCombo getInstance(String strID, Accelerator accelerator, DataAdaptor adaptor) Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.- Parameters:
strID- The identifier of the new combo sequenceaccelerator- The accelerator that holds to the sequencesadaptor- the data adaptor for specifying the sequences to combine- Returns:
- a new AcceleratorSeqCombo instance if the sequences do not form a ring and a Ring if they do
-
getInstance
Instantiate a an AcceleratorSeqCombo or a subclass depending on whether the sequences form a ring.- Parameters:
accelerator- The accelerator that holds to the sequencesadaptor- the data adaptor for specifying the sequences to combine- Returns:
- a new AcceleratorSeqCombo instance if the sequences do not form a ring and a Ring if they do
-
getInstanceForRange
public static AcceleratorSeqCombo getInstanceForRange(String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence) Get an instance of a non-cycling combo sequence which starts and ends between the specified sequences inclusively.- Parameters:
comboID- unique ID to assign to the new combo sequencestartSequence- first sequence in comboendSequence- last sequence in combo- Returns:
- a combo sequence ranging from the first sequence to the last sequence or null if none can be found
-
getInstancesForRange
public static List<AcceleratorSeqCombo> getInstancesForRange(String comboID, AcceleratorSeq startSequence, AcceleratorSeq endSequence) Get the list of all non-cycling combo sequences which start and end between the specified sequences inclusively.- Parameters:
comboID- unique ID to assign to the new combo sequencestartSequence- first sequence in comboendSequence- last sequence in combo- Returns:
- list of combo sequences ranging from the first sequence to the last sequence
-
getSequences
Get the sequences in the accelerator which are referenced in the adaptor.- Parameters:
accelerator- the accelerator from which to get the sequencesadaptor- the combo sequence adaptor
-
write
Write this sequence's definition to a data adaptor.- Specified by:
writein interfaceDataListener- Overrides:
writein classAcceleratorSeq- Parameters:
adaptor- the adaptor to which to write out this combo sequence's definition.
-
getType
Override to identify this sequence as a combo sequence- Overrides:
getTypein classAcceleratorSeq- Returns:
- the combo sequence type identifier
-
getLength
public double getLength()override the total length for this combo sequence- Overrides:
getLengthin classAcceleratorSeq- Returns:
- the length of this sequence along the closed orbit
-
getConstituentNames
gets the list of the names of the constituent sequences -
getPosition
get the position of a node in the sequence, including the extra length of the sequence starting position itself Note: this way could also be done in the parent AcceleratorSeq class, be we choose to use a more efficient scheme there, specific to primary sequences.- Overrides:
getPositionin classAcceleratorSeq- Parameters:
node- - the node for which the position is wanted
-
getEntranceID
Get the ID of the first base constituent sequence of this combo sequence.- Overrides:
getEntranceIDin classAcceleratorSeq- Returns:
- the ID of first base constituent sequence
-
getNodeWithId
Search deeply for and get the node with the specified id. Overrides the inherited method to search down the path of the constituent sequences.- Overrides:
getNodeWithIdin classAcceleratorSeq- Parameters:
label- The id of the node we are seeking.- Returns:
- the node corresponding to the requested id or null if no such node is found.
-
getNodes
Shallow fetch of nodes. Override the AcceleratorSeq version to only return the list of nodes which are a union of those nodes which belong to the base constituent sub-sequences.- Overrides:
getNodesin classAcceleratorSeq- Returns:
- a list of this sequence's immediate child nodes
-
getSequences
Shallow fetch of sequences. Override the AcceleratorSeq version to only return the list of sequences which are a union of those nodes which belong to the base constituent sub-sequences.- Overrides:
getSequencesin classAcceleratorSeq
-
getConstituents
Get the constituent sequences.- Returns:
- the list of constituent sequences that make the primary sequence
-
getConstituentsWithQualifier
Get the constituent sequences that are matched by the qualifier.- Parameters:
qualifier- The qualifier to restrict which constituents are returned- Returns:
- the list of constituent sequences that make the combo sequence
-
getBaseConstituents
Get the constituent sequences looking deeply even if the combo sequences are nested in many layers.- Returns:
- the list of constituent sequences that make the combo sequence
-
getBaseConstituentsWithQualifier
Get the constituent sequences looking deeply even if the combo sequences are nested in many layers. Use the qualifier to limit the constituent sequences to only those which match the qualifier.- Parameters:
qualifier- The qualifier for matching which constituents get returned- Returns:
- the list of qualified constituent sequences that make the combo sequence
-
getAllInclusiveNodes
Get all nodes including this sequence and constituent sequences and all of their children.- Overrides:
getAllInclusiveNodesin classAcceleratorSeq- Returns:
- the list of all inclusive nodes
-
getAllNodes
Fetch all nodes looking deeply through nested child sequences. Filter out constituent sequences.- Overrides:
getAllNodesin classAcceleratorSeq- Returns:
- all child nodes looking deeply through nested child sequences
-
equals
Override the equals method to return true if and only if the two combo sequences have equal IDs, are both combo sequences and have equal constituents. -
hashCode
public int hashCode()Override hashCode() as required when overriding equals() -
getAperProfile
Description copied from class:AcceleratorSeqGet all nodes in the specified sequence and gets the aperture bucket values.- Overrides:
getAperProfilein classAcceleratorSeq- Returns:
- an ApertureProfile object containing the X and Y aperture profiles
-