Package xal.smf
Class Accelerator
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.AcceleratorSeq
xal.smf.Accelerator
- All Implemented Interfaces:
Comparable
,ElementType
,DataListener
- Direct Known Subclasses:
ESSAccelerator
The hierarchical tree of accelerator nodes, elements and sequences of
elements.
- Author:
- Nikolay Malitsky, Christopher K. Allen
-
Field Summary
Fields inherited from class xal.smf.AcceleratorSeq
arrNodes, bucSequence, nodeTable, sequences, TYPE
-
Constructor Summary
ConstructorsConstructorDescriptionAccelerator
(String sysId) Primary constructorAccelerator
(String sysId, ChannelFactory channelFactory) Primary constructorAccelerator
(ChannelFactory channelFactory) Primary constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addComboSequence
(AcceleratorSeqCombo comboSequence) Add a combo sequence to this acceleratordataLabel() provides the name used to identify the accelerator in an external data source.Get this accelerator's edit contextfindSequence
(String sequenceID) Find a sequence with the specified ID.return the top level accelerator that this node belongs togetComboSequence
(String comboID) Fetch the predefined combo sequence based on its IDGet the list of predefined combo sequences ordered by ID.getDate()
Returns the model element mapping currently in use by this accelerator.Get the set of all magnet main suppliesgetMagnetMainSupply
(String supplyId) Get a main power supply whose id is supplyIdGet the set of all magnet trim suppliesgetMagnetTrimSupply
(String supplyId) Get a main power supply whose id is supplyIdReturns the AcceleratorNode with a requested nameGet the accelerator node factoryGet the ring in this accelerator with the specified IDgetRings()
Get the list of all rings in the acceleratorgetRoot()
Get this accelerator's timing centerboolean
boolean
protected void
nodeAdded
(AcceleratorNode node) Handle the event indicating that a node has been added.protected void
nodeRemoved
(AcceleratorNode node) Handle the event indicating that a node has been removed.void
putMagnetMainSupply
(MagnetMainSupply mainSupply) Programmatically add or replace a magnet main supply keyed by its ID.void
putMagnetTrimSupply
(MagnetTrimSupply trimSupply) Programmatically add or replace a magnet trim supply keyed by its ID.void
removeComboSequence
(String comboSequenceId) Remove a combo sequence from this acceleratorvoid
void
setEditContext
(EditContext newContext) Set this accelerator's edit contextvoid
setElementMapping
(ElementMapping elementMapping) Sets the model element mapping used by this accelerator object.void
setFieldMapPath
(String absoluteUrlSpec) void
setNodeFactory
(AcceleratorNodeFactory nodeFactory) Set the factory used to generate new accelerator nodesvoid
setPowerSuppliesFile
(boolean powerSuppliesFile) void
setStatusFile
(boolean statusFile) void
setTimingCenter
(TimingCenter timingCenter) Set this accelerator's timing centervoid
setVersion
(String strVer) void
update
(DataAdaptor adaptor) Instructs the accelerator to update its data based on the given adaptor.void
updateChannelFactory
(ChannelFactory channelFactory) Updates the channel suites with the new ChannelFactory.protected void
updatePowerSupplies
(DataAdaptor adaptor) Update the power supplies given the power supply adaptorvoid
write
(DataAdaptor adaptor) Instructs the accelerator to write its data to the adaptor for external storage.protected void
writeAttributes
(DataAdaptor adaptor) write the attributes of the Node.void
writePowerSupplies
(DataAdaptor adaptor) Write power supplies to the given data adaptor, including the accelerator node.void
writeStatus
(DataAdaptor adaptor) method to write status of the node into a separate fileMethods inherited from class xal.smf.AcceleratorSeq
addBucket, addNode, addNodeAt, addSequenceChain, addSoft, appendNodesOfClassWithQualifier, appendNodesWithQualifier, canPrecede, contains, filterNodesByClass, filterNodesByStatus, formsRing, getAllInclusiveNodes, getAllInclusiveNodes, getAllInclusiveNodesWithQualifier, getAllNodes, getAllNodes, getAllNodesOfType, getAllNodesWithQualifier, getAllSeqs, getAperProfile, getAperProfile, getDistanceBetween, getEntranceID, getIndexOfNode, getLeaves, getLength, getNodeAt, getNodeCount, getNodes, getNodes, getNodesOfClassWithQualifier, getNodesOfClassWithQualifier, getNodesOfClassWithStatus, getNodesOfType, getNodesOfType, getNodesWithQualifier, getNodesWithQualifier, getNodeWithId, getPosition, getPredecessors, getPrimaryAncestor, getRelativePosition, getRelativePosition, getSequence, getSequenceBuc, getSequences, getSequences, getShortestRelativePosition, getType, indexToAddNode, isLinear, orderSequences, recurNodeSearch, recurSeqSearch, removeAllNodes, removeNode, setSequence, sortNodes, sortNodesByProximity, sortNodesByRelativePosition, writeDeeply
Methods inherited from class xal.smf.AcceleratorNode
batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, findChannel, 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
-
Constructor Details
-
Accelerator
public Accelerator() -
Accelerator
Primary constructor -
Accelerator
Primary constructor -
Accelerator
Primary constructor
-
-
Method Details
-
dataLabel
dataLabel() provides the name used to identify the accelerator in an external data source.- Specified by:
dataLabel
in interfaceDataListener
- Overrides:
dataLabel
in classAcceleratorSeq
- Returns:
- The accelerator's tag
-
hasStatusFile
public boolean hasStatusFile() -
setStatusFile
public void setStatusFile(boolean statusFile) -
hasPowerSuppliesFile
public boolean hasPowerSuppliesFile() -
setPowerSuppliesFile
public void setPowerSuppliesFile(boolean powerSuppliesFile) -
update
Instructs the accelerator to update its data based on the given adaptor.- Specified by:
update
in interfaceDataListener
- Overrides:
update
in classAcceleratorSeq
- Parameters:
adaptor
- The adaptor from which to update the accelerator's data- Throws:
NumberFormatException
-
updatePowerSupplies
Update the power supplies given the power supply adaptor- Parameters:
adaptor
- The adaptor for the accelerator power supplies
-
putMagnetMainSupply
Programmatically add or replace a magnet main supply keyed by its ID. If a power supply has the same ID as another power supply in this accelerator then it will replace that one.- Parameters:
mainSupply
- main power supply to add or replace- Throws:
IllegalArgumentException
- if the power supply's accelerator does not match this accelerator to which it is being put
-
putMagnetTrimSupply
Programmatically add or replace a magnet trim supply keyed by its ID. If a power supply has the same ID as another power supply in this accelerator then it will replace that one.- Parameters:
trimSupply
- trim power supply to add or replace- Throws:
IllegalArgumentException
- if the power supply's accelerator does not match this accelerator to which it is being put
-
write
Instructs the accelerator to write its data to the adaptor for external storage.- Specified by:
write
in interfaceDataListener
- Overrides:
write
in classAcceleratorSeq
- Parameters:
adaptor
- The adaptor to which the accelerator's data is written
-
writePowerSupplies
Write power supplies to the given data adaptor, including the accelerator node.- Parameters:
adaptor
-
-
writeAttributes
Description copied from class:AcceleratorNode
write the attributes of the Node. Subclasses can be override this method to write a different set of attributes- Overrides:
writeAttributes
in classAcceleratorSeq
-
writeStatus
method to write status of the node into a separate file- Overrides:
writeStatus
in classAcceleratorSeq
-
nodeAdded
Handle the event indicating that a node has been added.- Parameters:
node
- the node that has been added
-
nodeRemoved
Handle the event indicating that a node has been removed.- Parameters:
node
- the node that has been removed
-
getSystemId
-
getDate
-
getVersion
-
getRoot
-
getAccelerator
Description copied from class:AcceleratorNode
return the top level accelerator that this node belongs to- Overrides:
getAccelerator
in classAcceleratorNode
-
setDate
-
setVersion
-
getNodeFactory
Get the accelerator node factory -
setNodeFactory
Set the factory used to generate new accelerator nodes -
setElementMapping
Sets the model element mapping used by this accelerator object.- Parameters:
elementMapping
- the new element mapping
-
getElementMapping
Returns the model element mapping currently in use by this accelerator.- Returns:
- accelerator's model element mapping
-
updateChannelFactory
Updates the channel suites with the new ChannelFactory. This method is useful when running a CA server after the context is disposed.- Parameters:
channelFactory
- - the new ChannelFactory added by Juan
-
editContext
Get this accelerator's edit context- Returns:
- This accelerator's edit context
-
setEditContext
Set this accelerator's edit context- Parameters:
newContext
- the accelerator's new edit context
-
getTimingCenter
Get this accelerator's timing center- Returns:
- This accelerator's timing center
-
setTimingCenter
Set this accelerator's timing center- Parameters:
timingCenter
- the accelerator's new timing center
-
addComboSequence
Add a combo sequence to this accelerator- Parameters:
comboSequence
- The combo sequence to add
-
removeComboSequence
Remove a combo sequence from this accelerator- Parameters:
comboSequenceId
- The ID of the combo sequence to remove.
-
getComboSequence
Fetch the predefined combo sequence based on its ID- Parameters:
comboID
- the id identifying the combo sequence- Returns:
- the combo sequence for the ID or null if none matches
-
getComboSequences
Get the list of predefined combo sequences ordered by ID.- Returns:
- the list of predefined combo sequences ordered by ID.
-
getRing
Get the ring in this accelerator with the specified ID- Parameters:
ringID
- the ID of the ring to get- Returns:
- the ring in this accelerator with the specified ID or null if none exists
-
getRings
Get the list of all rings in the accelerator- Returns:
- a list of all rings in the accelerator
-
findSequence
Find a sequence with the specified ID. The sequence may either be a direct child sequence or a predefined combo sequence.- Parameters:
sequenceID
- the id identifying the desired sequence- Returns:
- the sequence for the ID or null if none matches
-
getNode
Returns the AcceleratorNode with a requested name- Parameters:
nodeID
- - the name to match
-
getMagnetMainSupplies
Get the set of all magnet main supplies- Returns:
- the set of all magnet main supplies
-
getMagnetMainSupply
Get a main power supply whose id is supplyId- Parameters:
supplyId
- The id of the main power supply to get- Returns:
- The main power supply or null if the supplyId is not found
-
getMagnetTrimSupplies
Get the set of all magnet trim supplies- Returns:
- the set of all magnet trim supplies
-
getMagnetTrimSupply
Get a main power supply whose id is supplyId- Parameters:
supplyId
- The id of the main power supply to get- Returns:
- The main power supply or null if the supplyId is not found
-
getFieldMapPath
-
setFieldMapPath
-