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 String
protected String
static final String
static final String
Fields inherited from class xal.smf.impl.PermanentMagnet
field
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
ConstructorsConstructorDescriptionPermQuadrupole
(String strId) PermQuadrupole constructorPermQuadrupole
(String strId, ChannelFactory channelFactory) PermQuadrupole 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
Test if the magnet is of the specified pole type.void
update
(DataAdaptor adaptor) Update the instance with data from the data adaptor.Methods inherited from class xal.smf.impl.PermanentMagnet
getField, getFieldInt, getLivePropertyChannels, getLivePropertyValue, isPermanent
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, 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:
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 "PMQH" or "PMQV".- Specified by:
update
in interfaceDataListener
- Overrides:
update
in classAcceleratorNode
- Parameters:
adaptor
- The data provider.
-
isPole
Description copied from class:Magnet
Test if the magnet is of the specified pole type. MagnetType defines the list of accepted pole types.- Specified by:
isPole
in interfaceMagnetType
- Overrides:
isPole
in 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:
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 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:
isKindOf
in interfaceElementType
- Overrides:
isKindOf
in classAcceleratorNode
- Parameters:
compType
- The type to compare against.- Returns:
- true if the node is a match and false otherwise.
-