Package xal.smf.impl
Class Electrostatic
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.Electrostatic
- All Implemented Interfaces:
Comparable,ElementType,DataListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MagnetBucketThe container for the magnet informationfinal AccessiblePropertystatic final Stringfield readback handlestatic final intprotected Stringthe ID of this magnet's main power supplystatic final intstatic final Stringstandard type for instances of this classprotected booleanindicates whether to use the actual field readback or the field setting in the getField() methodstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionElectrostatic(String strId) ConstructorElectrostatic(String strId, ChannelFactory channelFactory) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBucket(AttributeBucket buc) Override AcceleratorNode implementation to check for a MultipoleBucketdoubleget the design field for the magnet (T for dipole, T/m for quad, etc.)doubleget the default magnetic fielddoubleget the effective magnetic length (m)doublegetField()Get the field in this electromagnet via ca.doubleGet the field in this electromagnet via ca.doubleGet the value to which the main power supply's field contribution is set.Get the main power supply for this magnet.intGet the orientation of the magnet as defined by MagnetType.doubleget magnet polaritydoubleGet the value to which the field is set including both the main supply and possible trim supply contributions.getType()Derived class must furnish a unique type idbooleanbooleanvoidsetMagBucket(MagnetBucket buc) Set the attribute bucket containing the machine magnet infofinal doubletoCAFromField(double field) Convert the field value to a channel access value.final doubletoFieldFromCA(double rawValue) Convert the raw channel access value to get the field.protected voidwritePowerSupplies(DataAdaptor powerSupplyAdaptor) Write data to the power supply data adaptor.Methods inherited from class xal.smf.AcceleratorNode
batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, dataLabel, findChannel, getAccelerator, getAccessibleProperties, getAccessibleProperties, getAlign, getAllChannels, getAndConnectChannel, getAndConnectChannelSetAndReadback, getAper, getBucket, getBuckets, getChannel, getDefaultHandles, getDesignPropertyValue, getEId, getHandles, getId, getLength, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, 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, update, write, writeAttributes, writeStatus
-
Field Details
-
TYPE
standard type for instances of this class- See Also:
-
NO_ORIENTATION
public static final int NO_ORIENTATION- See Also:
-
HORIZONTAL
public static final int HORIZONTAL- See Also:
-
VERTICAL
public static final int VERTICAL- See Also:
-
bucMagnet
The container for the magnet information -
useFieldReadback
protected boolean useFieldReadbackindicates whether to use the actual field readback or the field setting in the getField() method -
FIELD_RB_HANDLE
field readback handle- See Also:
-
field
-
mainSupplyId
the ID of this magnet's main power supply
-
-
Constructor Details
-
Electrostatic
Primary Constructor -
Electrostatic
Constructor
-
-
Method Details
-
getMagBucket
- Returns:
- the attribute bucket containing the machine multipole fields
-
addBucket
Override AcceleratorNode implementation to check for a MultipoleBucket- Overrides:
addBucketin classAcceleratorNode
-
setMagBucket
Set the attribute bucket containing the machine magnet info -
getType
Description copied from class:AcceleratorNodeDerived class must furnish a unique type id- Specified by:
getTypein classAcceleratorNode
-
getDesignField
public double getDesignField()get the design field for the magnet (T for dipole, T/m for quad, etc.) -
getEffLength
public double getEffLength()get the effective magnetic length (m) -
getDfltField
public double getDfltField()get the default magnetic field -
getField
Get the field in this electromagnet via ca.- Returns:
- the field in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
- Throws:
GetException
-
getTotalFieldSetting
Get the value to which the field is set including both the main supply and possible trim supply contributions. Note that this is not the readback.- Returns:
- the field setting in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
- Throws:
GetException
-
getFieldReadback
Get the field in this electromagnet via ca.- Returns:
- the readback field in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
- Throws:
GetException
-
getFieldSetting
Get the value to which the main power supply's field contribution is set. Note that this is not the readback.- Returns:
- the field setting in T/(m^(n-1)), where n = 1 for dipole, 2 for quad, etc.
- Throws:
GetException
-
getMainSupply
Get the main power supply for this magnet.- Returns:
- The main power supply for this magnet
-
getPolarity
public double getPolarity()get magnet polarity -
toFieldFromCA
public final double toFieldFromCA(double rawValue) Convert the raw channel access value to get the field.- Parameters:
rawValue- the raw channel value- Returns:
- the magnetic field in T/m^(n-1)
-
toCAFromField
public final double toCAFromField(double field) Convert the field value to a channel access value.- Parameters:
field- the magnetic field in T/m^(n-1)- Returns:
- the channel access value
-
writePowerSupplies
Write data to the power supply data adaptor. Put the information about the main power supply into the data adaptor.- Parameters:
powerSupplyAdaptor- The data sink for the power supply information
-
getOrientation
public int getOrientation()Get the orientation of the magnet as defined by MagnetType. The orientation of the quad is determined by its type: QH or QV- Returns:
- One of HORIZONTAL or VERTICAL
-
isHorizontal
public boolean isHorizontal() -
isVertical
public boolean isVertical()
-