Package xal.smf.impl
Class PermQuadrupole
java.lang.Object
xal.smf.AcceleratorNode
xal.smf.impl.Magnet
xal.smf.impl.PermanentMagnet
xal.smf.impl.PermQuadrupole
- All Implemented Interfaces:
Comparable,ElementType,MagnetType,DataListener
PermQuadrupole implements an Permanent magnet Quadrupole. Unlike many other
beam line elements, PermQuadrupole represents more than one official type
(PMQH and PMQV) 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:
- tap
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Stringstatic final Stringstatic final StringFields inherited from class xal.smf.impl.PermanentMagnet
fieldFields 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
ConstructorsConstructorDescriptionPermQuadrupole(String strId) PermQuadrupole constructorPermQuadrupole(String strId, ChannelFactory channelFactory) PermQuadrupole constructor -
Method Summary
Modifier and TypeMethodDescriptionintGet the orientation of the magnet as defined by MagnetType.getType()Override to provide the correct type signature per instance.booleanDetermine if this node is of the specified type.booleanTest if the magnet is of the specified pole type.voidupdate(DataAdaptor adaptor) Update the instance with data from the data adaptor.Methods inherited from class xal.smf.impl.PermanentMagnet
getField, getFieldInt, getLivePropertyChannels, getLivePropertyValue, isPermanentMethods inherited from class xal.smf.impl.Magnet
addBucket, getConversionFactor, getDesignField, getDfltField, getEffLength, getMagBucket, getNormField, getPolarity, getTangField, isCorrector, isHorizontal, isMagnet, isSkew, isVertical, setDfltField, setMagBucketMethods 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, getParent, getPId, getPitchAngle, getPosition, getPrimaryAncestor, getProperties, getReadbackHandles, getRollAngle, getSDisplay, getSetHandle, getSoftType, getStatus, getTwiss, getValid, getXOffset, getYawAngle, getYOffset, getZOffset, hasBucket, hasParent, isChannelSettable, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setDesignPropertyValue, setLength, setLivePropertyValue, setParent, setPitchAngle, setPosition, setRollAngle, setSDisplay, setStatus, setTwiss, setValid, setValueAndVerify, setXOffset, setYawAngle, setYOffset, setZOffset, toString, write, writeAttributes, writeStatus
-
Field Details
-
TYPE
- See Also:
-
HORIZONTAL_TYPE
- See Also:
-
VERTICAL_TYPE
- See Also:
-
nodeType
-
-
Constructor Details
-
PermQuadrupole
PermQuadrupole constructor -
PermQuadrupole
PermQuadrupole constructor
-
-
Method Details
-
getType
Override to provide the correct type signature per instance. This is necessary since the PermQuadrupole class can represent more than one official type (PMQH or PMQV).- Specified by:
getTypein 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 "PMQH" or "PMQV".- Specified by:
updatein interfaceDataListener- Overrides:
updatein classAcceleratorNode- Parameters:
adaptor- The data provider.
-
isPole
Description copied from class:MagnetTest if the magnet is of the specified pole type. MagnetType defines the list of accepted pole types.- Specified by:
isPolein interfaceMagnetType- Overrides:
isPolein classMagnet- 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. The orientation of the quad is determined by its type: PMQH or PMQV- Specified by:
getOrientationin interfaceMagnetType- Overrides:
getOrientationin classMagnet- Returns:
- One of HORIZONTAL or VERTICAL
-
isKindOf
Determine if this node is of the specified type. Override the default method since a permanent 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:
isKindOfin interfaceElementType- Overrides:
isKindOfin classAcceleratorNode- Parameters:
compType- The type to compare against.- Returns:
- true if the node is a match and false otherwise.
-