Package xal.smf.impl
Class Magnet
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.Magnet
- All Implemented Interfaces:
Comparable,ElementType,MagnetType,DataListener
- Direct Known Subclasses:
Electromagnet,PermanentMagnet
The abstract Magnet Class element. This class contains elements common to all
magnets in an accelerator.
- Author:
- J. Galambos
-
Field Summary
FieldsFields inherited from class xal.smf.AcceleratorNode
bolIsSoft, bolStatus, bolValid, bucAlign, bucAper, bucTwiss, channelSuite, dblLen, dblPos, dblS, mapAttrs, objAccel, seqParent, strEId, strId, strPIdFields inherited from interface xal.smf.impl.qualify.MagnetType
DIPOLE, HORIZONTAL, NO_ORIENTATION, OCT, OCTUPOLE, poles, QUAD, QUADRUPOLE, SEXT, SEXTUPOLE, SOL, SOLENOID, VERTICAL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructorprotectedMagnet(String strId, ChannelFactory channelFactory) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBucket(AttributeBucket buc) Override AcceleratorNode implementation to check for a MultipoleBucketdoubleA magnet may have defined a (simple) conversion factor between the effective magnetic field and the current applied.doubleget the design field for the magnet (T for dipole, T/m for quad, etc.)doubleget the default magnetic fielddoubleget the effective magnetic length (m)double[]get Normal fieldsintGet the orientation of the magnet as defined by MagnetType.doubleget magnet polaritydouble[]get tangential fieldsbooleanDetermine whether this magnet is a corrector.final booleanDetermine whether this magnet is oriented horizontally.booleanisMagnet()Override the inherited method to be true since all magnets are of the magnet type.booleanGet whether this magnet is a permanent magnet or an electromagnet.booleanTest if the magnet is of the specified pole type.booleanisSkew()Determine whether this magnet is a skew magnet.final booleanDetermine whether this magnet is oriented vertically.voidsetDfltField(double field) Method setDfltFieldvoidsetMagBucket(MagnetBucket buc) Set the attribute bucket containing the machine magnet infoMethods 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, getType, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isChannelSettable, isKindOf, 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, writeStatusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface xal.smf.impl.qualify.ElementType
isKindOf
-
Field Details
-
bucMagnet
The container for the magnet information
-
-
Constructor Details
-
Magnet
Primary Constructor -
Magnet
Constructor
-
-
Method Details
-
getMagBucket
- Returns:
- the attribute bucket containing the machine multipole fields
-
setMagBucket
Set the attribute bucket containing the machine magnet info -
addBucket
Override AcceleratorNode implementation to check for a MultipoleBucket- Overrides:
addBucketin classAcceleratorNode
-
isMagnet
public boolean isMagnet()Override the inherited method to be true since all magnets are of the magnet type.- Specified by:
isMagnetin interfaceElementType- Overrides:
isMagnetin classAcceleratorNode- Returns:
- true
-
isPole
Test if the magnet is of the specified pole type. MagnetType defines the list of accepted pole types.- Specified by:
isPolein interfaceMagnetType- Parameters:
compPole- Comparison pole which should be one of MagnetType.poles- Returns:
- true if the magnet is of the specified pole.
-
getOrientation
public int getOrientation()Get the orientation of the magnet as defined by MagnetType.- Specified by:
getOrientationin interfaceMagnetType- Returns:
- One of HORIZONTAL, VERTICAL or NO_ORIENTATION
-
isHorizontal
public final boolean isHorizontal()Determine whether this magnet is oriented horizontally.- Specified by:
isHorizontalin interfaceMagnetType- Returns:
- true if this magnet is oriented horizontally; false otherwise.
-
isVertical
public final boolean isVertical()Determine whether this magnet is oriented vertically.- Specified by:
isVerticalin interfaceMagnetType- Returns:
- true if this magnet is oriented vertically; false otherwise.
-
isSkew
public boolean isSkew()Determine whether this magnet is a skew magnet.- Specified by:
isSkewin interfaceMagnetType- Returns:
- true if the magnet is skew and false otherwise.
-
isPermanent
public boolean isPermanent()Get whether this magnet is a permanent magnet or an electromagnet.- Specified by:
isPermanentin interfaceMagnetType- Returns:
- true if the magnet is permanent and false otherwise.
-
isCorrector
public boolean isCorrector()Determine whether this magnet is a corrector.- Specified by:
isCorrectorin interfaceMagnetType- Returns:
- true if this magnet is a corrector.
-
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 -
getPolarity
public double getPolarity()get magnet polarity -
getConversionFactor
public double getConversionFactor()A magnet may have defined a (simple) conversion factor between the effective magnetic field and the current applied. Useful for simulating with current parameters.- Returns:
- The conversion factor field/current [T/m^n/A]
-
getNormField
public double[] getNormField()get Normal fields -
getTangField
public double[] getTangField()get tangential fields -
setDfltField
public void setDfltField(double field) Method setDfltField- Parameters:
field- the default magnetic field to be changed to.
-