Package xal.smf.impl
Class Quadrupole
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.Magnet
xal.smf.impl.Electromagnet
xal.smf.impl.Quadrupole
- All Implemented Interfaces:
Comparable
,ElementType
,MagnetType
,DataListener
- Direct Known Subclasses:
TrimmedQuadrupole
Quadrupole implements an Electromagnet Quadrupole supplied by a single power
supply. Unlike many other beam line elements, Quadrupole represents more than
one official type (QH and QV) as specified by the naming convention. In order
to support this feature we override the getType(), update() and isKindOf()
methods. The vertical and horizontal reference to a quadrupole isn't of
consequence to behavior since the field of the quadrupole (including its
sign) and its length characterizes the quadrupole.
- Author:
- Nikolay Malitsky, Christopher K. Allen, Tom Pelaia, Blaz Kranjc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
horizontal quadrupole typeprotected String
the type of quadrupole (horizontal or vertical) The default value is used if Quadrupole is never updated.static final String
skew quadrupole typestatic final String
static final String
vertical quadrupole typeFields inherited from class xal.smf.impl.Electromagnet
field, FIELD_RB_HANDLE, fieldFromCurrent, fieldRBProperty, mainSupplyId, useFieldReadback
Fields inherited from class xal.smf.AcceleratorNode
bolIsSoft, bolStatus, bolValid, bucAlign, bucAper, bucTwiss, channelSuite, dblLen, dblPos, dblS, mapAttrs, objAccel, seqParent, strEId, strId, strPId
Fields inherited from interface xal.smf.impl.qualify.MagnetType
DIPOLE, HORIZONTAL, NO_ORIENTATION, OCT, OCTUPOLE, poles, QUAD, QUADRUPOLE, SEXT, SEXTUPOLE, SOL, SOLENOID, VERTICAL
-
Constructor Summary
ConstructorsConstructorDescriptionQuadrupole
(String strID) ConstructorQuadrupole
(String strID, ChannelFactory channelFactory) Primary Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
Get the orientation of the magnet as defined by MagnetType.getType()
Override to provide the correct type signature per instance.boolean
Determine if this node is of the specified type.boolean
Determine whether this magnet is of the pole specified.void
update
(DataAdaptor adaptor) Update the instance with data from the data adaptor.Methods inherited from class xal.smf.impl.Electromagnet
findChannel, getAccessibleProperties, getCurrent, getCycleState, getDefaultHandles, getField, getFieldInt, getFieldReadback, getFieldSetting, getHandles, getMainSupply, getReadbackHandles, getSetHandle, getTotalFieldSetting, isChannelSettable, isPermanent, lowerAlarmFieldLimit, lowerCurrentLimit, lowerDisplayFieldLimit, lowerFieldLimit, lowerWarningFieldLimit, setCurrent, setCycleEnable, setField, setMainSupplyId, setUseFieldReadback, toCAFromField, toCurrentFromField, toFieldFromCA, toFieldFromCurrent, updatePowerSupplies, upperAlarmFieldLimit, upperCurrentLimit, upperDisplayFieldLimit, upperFieldLimit, upperWarningFieldLimit, useFieldReadback, write, writePowerSupplies
Methods inherited from class xal.smf.impl.Magnet
addBucket, getConversionFactor, getDesignField, getDfltField, getEffLength, getMagBucket, getNormField, getPolarity, getTangField, isCorrector, isHorizontal, isMagnet, isSkew, isVertical, setDfltField, setMagBucket
Methods inherited from class xal.smf.AcceleratorNode
batchConnectAllHandles, batchConnectAllHandlesAndWait, channelSuite, clear, compareTo, dataLabel, getAccelerator, getAccessibleProperties, getAlign, getAllChannels, getAndConnectChannel, getAndConnectChannelSetAndReadback, getAper, getBucket, getBuckets, getChannel, getDesignPropertyValue, getEId, getId, getLength, getLivePropertyChannels, getLivePropertyValue, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, getProperties, getRollAngle, getSDisplay, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setDesignPropertyValue, setLength, setLivePropertyValue, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setValueAndVerify, setXOffset, setYawAngle, setYOffset, setZOffset, toString, writeAttributes, writeStatus
-
Field Details
-
TYPE
- See Also:
-
HORIZONTAL_TYPE
horizontal quadrupole type- See Also:
-
VERTICAL_TYPE
vertical quadrupole type- See Also:
-
SKEW_TYPE
skew quadrupole type- See Also:
-
nodeType
the type of quadrupole (horizontal or vertical) The default value is used if Quadrupole is never updated.
-
-
Constructor Details
-
Quadrupole
Primary Constructor- Parameters:
strID
- the unique node identifier
-
Quadrupole
Constructor- Parameters:
strID
- the unique node identifier
-
-
Method Details
-
getType
Override to provide the correct type signature per instance. This is necessary since the Quadrupole class can represent more than one official type (QH or QV).- Specified by:
getType
in classAcceleratorNode
- Returns:
- The official type consistent with the naming convention.
-
update
Update the instance with data from the data adaptor. Overrides the default implementation to set the quadrupole type since a quadrupole type can be either "QH" or "QV".- Specified by:
update
in interfaceDataListener
- Overrides:
update
in classElectromagnet
- Parameters:
adaptor
- The data provider.
-
isPole
Determine whether this magnet is of the pole specified.- Specified by:
isPole
in interfaceMagnetType
- Overrides:
isPole
in classMagnet
- Parameters:
compPole
- The pole against which this magnet is being compared.- Returns:
- true if this magnet matches the specified pole.
-
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- Specified by:
getOrientation
in interfaceMagnetType
- Overrides:
getOrientation
in classMagnet
- Returns:
- One of HORIZONTAL or VERTICAL
-
isKindOf
Determine if this node is of the specified type. Override the default method since a quadrupole could represent either a vertical or horizontal type. Must also handle inheritance checking so we must or the direct type comparison with the inherited type checking.- Specified by:
isKindOf
in interfaceElementType
- Overrides:
isKindOf
in classAcceleratorNode
- Parameters:
type
- The type against which to compare this quadrupole's type.- Returns:
- true if the node is a match and false otherwise.
-