gov.sns.xal.smf.impl
Class TrimmedQuadrupole

java.lang.Object
  |
  +--gov.sns.xal.smf.AcceleratorNode
        |
        +--gov.sns.xal.smf.impl.Magnet
              |
              +--gov.sns.xal.smf.impl.Electromagnet
                    |
                    +--gov.sns.xal.smf.impl.Quadrupole
                          |
                          +--gov.sns.xal.smf.impl.TrimmedQuadrupole
All Implemented Interfaces:
DataListener, ElementType, MagnetType

public class TrimmedQuadrupole
extends Quadrupole

TrimmedQuadrupole is a subclass of Quadrupole that has a trim power supply in addition to a main power supply.


Field Summary
static java.lang.String HORIZONTAL_TYPE
           
static java.lang.String s_strType
           
protected  java.lang.String trimSupplyId
           
static java.lang.String VERTICAL_TYPE
           
 
Fields inherited from class gov.sns.xal.smf.impl.Quadrupole
type
 
Fields inherited from class gov.sns.xal.smf.impl.Electromagnet
FIELD_RB_HANDLE, mainSupplyId
 
Fields inherited from class gov.sns.xal.smf.impl.Magnet
leff, m_bucMagnet
 
Fields inherited from class gov.sns.xal.smf.AcceleratorNode
channelSuite, m_bolIsSoft, m_bolStatus, m_bolValid, m_bucAlign, m_bucAper, m_bucTwiss, m_dblLen, m_dblPos, m_mapAttrs, m_objAccel, m_seqParent, m_strId
 
Fields inherited from interface gov.sns.xal.smf.impl.qualify.MagnetType
DIPOLE, HORIZONTAL, NO_ORIENTATION, OCT, OCTUPOLE, poles, QUAD, QUADRUPOLE, SEXT, SEXTUPOLE, VERTICAL
 
Constructor Summary
TrimmedQuadrupole(java.lang.String strId)
          TrimmedQuadrupole constructor.
 
Method Summary
 Channel getChannel(java.lang.String handle)
          Get the channel corresponding to the specified handle.
 java.util.Collection getHandles()
          Get the channel handles.
 int getOrientation()
          Get the orientation of the magnet as defined by MagnetType.
 double getTrimCurrent()
          Get the trim power supply current in this electromagnet via ca (A)
 MagnetTrimSupply getTrimSupply()
          Get the trim power supply for this magnet.
 void setTrimCurrent(double newCurrent)
          set the trim power supply current in the magnet (A)
 void setTrimField(double newField)
          Set the trim power supply field contribution in the magnet.
protected  void updatePowerSupplies(DataAdaptor powerSupplyAdaptor)
          Update data from the power supply data adaptor.
protected  void writePowerSupplies(DataAdaptor powerSupplyAdaptor)
          Write data to the power supply data adaptor.
 
Methods inherited from class gov.sns.xal.smf.impl.Quadrupole
getField, getType, isKindOf, isPole, lowerFieldLimit, setField, update, upperFieldLimit
 
Methods inherited from class gov.sns.xal.smf.impl.Electromagnet
getCurrent, getCycleState, getFieldInt, getMainSupply, isPermanent, lowerCurrentLimit, setCurrent, setCycleEnable, upperCurrentLimit, write
 
Methods inherited from class gov.sns.xal.smf.impl.Magnet
addBucket, getDesignField, getDfltField, getEffLength, getMagBucket, getNormField, getPolarity, getTangField, isCorrector, isHorizontal, isMagnet, isSkew, isVertical, setMagBucket
 
Methods inherited from class gov.sns.xal.smf.AcceleratorNode
channelSuite, clear, dataLabel, getAccelerator, getAlign, getAndConnectChannel, getAper, getBucket, getBuckets, getId, getLength, getParent, getPosition, getStatus, getTwiss, getValid, hasBucket, hasParent, lazilyGetAndConnect, removeFromParent, setAccelerator, setAlign, setAper, setLength, setParent, setPosition, setStatus, setTwiss, setValid, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s_strType

public static final java.lang.String s_strType
See Also:
Constant Field Values

HORIZONTAL_TYPE

public static final java.lang.String HORIZONTAL_TYPE
See Also:
Constant Field Values

VERTICAL_TYPE

public static final java.lang.String VERTICAL_TYPE
See Also:
Constant Field Values

trimSupplyId

protected java.lang.String trimSupplyId
Constructor Detail

TrimmedQuadrupole

public TrimmedQuadrupole(java.lang.String strId)
TrimmedQuadrupole constructor.

Method Detail

updatePowerSupplies

protected void updatePowerSupplies(DataAdaptor powerSupplyAdaptor)
Update data from the power supply data adaptor. Override the inherited method to provide trim power supply information.

Overrides:
updatePowerSupplies in class Electromagnet
Parameters:
powerSupplyAdaptor - The data provider of power supply information.

writePowerSupplies

protected void writePowerSupplies(DataAdaptor powerSupplyAdaptor)
Write data to the power supply data adaptor. Override the inherited method to put the trim power supply information into the data adaptor.

Overrides:
writePowerSupplies in class Electromagnet
Parameters:
powerSupplyAdaptor - The data sink for the power supply information

getHandles

public java.util.Collection getHandles()
Get the channel handles. Overrides the default method to add handles from the trim power supply.

Overrides:
getHandles in class Electromagnet
Returns:
The channel handles associated with this node

getChannel

public Channel getChannel(java.lang.String handle)
                   throws NoSuchChannelException
Get the channel corresponding to the specified handle. Override the inherited method to check the trim supply if the channel suite or main supply does not contain the handle.

Overrides:
getChannel in class Electromagnet
Parameters:
handle - The handle for the channel to get.
Returns:
The channel associated with this node and the specified handle or null if there is no match.
Throws:
NoSuchChannelException - if no such channel as specified by the handle is associated with this node.

getTrimSupply

public MagnetTrimSupply getTrimSupply()
Get the trim power supply for this magnet.

Returns:
The trim power supply for this magnet

setTrimField

public void setTrimField(double newField)
                  throws ConnectionException,
                         PutException
Set the trim power supply field contribution in the magnet. If cycle enable is true then the magnet is cycled before the field is set to the specified value.

ConnectionException
PutException

getTrimCurrent

public double getTrimCurrent()
                      throws ConnectionException,
                             GetException
Get the trim power supply current in this electromagnet via ca (A)

ConnectionException
GetException

setTrimCurrent

public void setTrimCurrent(double newCurrent)
                    throws ConnectionException,
                           PutException
set the trim power supply current in the magnet (A)

Parameters:
newCurrent - is the new current (A)
ConnectionException
PutException

getOrientation

public int getOrientation()
Get the orientation of the magnet as defined by MagnetType. The orientation of the quad is determined by its type: QTH or QTV

Specified by:
getOrientation in interface MagnetType
Overrides:
getOrientation in class Quadrupole
Returns:
One of HORIZONTAL or VERTICAL