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 MagnetBucket
The container for the magnet informationfinal AccessibleProperty
static final String
field readback handlestatic final int
protected String
the ID of this magnet's main power supplystatic final int
static final String
standard type for instances of this classprotected boolean
indicates 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 TypeMethodDescriptionvoid
addBucket
(AttributeBucket buc) Override AcceleratorNode implementation to check for a MultipoleBucketdouble
get the design field for the magnet (T for dipole, T/m for quad, etc.)double
get the default magnetic fielddouble
get the effective magnetic length (m)double
getField()
Get the field in this electromagnet via ca.double
Get the field in this electromagnet via ca.double
Get the value to which the main power supply's field contribution is set.Get the main power supply for this magnet.int
Get the orientation of the magnet as defined by MagnetType.double
get magnet polaritydouble
Get 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 idboolean
boolean
void
setMagBucket
(MagnetBucket buc) Set the attribute bucket containing the machine magnet infofinal double
toCAFromField
(double field) Convert the field value to a channel access value.final double
toFieldFromCA
(double rawValue) Convert the raw channel access value to get the field.protected void
writePowerSupplies
(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:
addBucket
in classAcceleratorNode
-
setMagBucket
Set the attribute bucket containing the machine magnet info -
getType
Description copied from class:AcceleratorNode
Derived class must furnish a unique type id- Specified by:
getType
in 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()
-