Package xal.smf.impl

Class PermanentMagnet

All Implemented Interfaces:
Comparable, ElementType, MagnetType, DataListener
Direct Known Subclasses:
PermQuadrupole

public abstract class PermanentMagnet extends Magnet
PermanentMagnet is the superclass of all permanent magnet classes.
Author:
tap
  • Field Details

  • Constructor Details

    • PermanentMagnet

      public PermanentMagnet(String strId, ChannelFactory channelFactory)
      Creates new PermanentMagnet
    • PermanentMagnet

      public PermanentMagnet(String strId)
      Creates new PermanentMagnet
  • Method Details

    • isPermanent

      public boolean isPermanent()
      Since this is a permanent magnet we override the inherited method to advertise this characteristic.
      Specified by:
      isPermanent in interface MagnetType
      Overrides:
      isPermanent in class Magnet
      Returns:
      true since all PermanentMagnet instances are permanent magnets.
    • getLivePropertyValue

      public double getLivePropertyValue(String propertyName, double[] channelValues)
      Get the live property value for the corresponding array of channel values in the order given by getLivePropertyChannels()
      Overrides:
      getLivePropertyValue in class AcceleratorNode
    • getLivePropertyChannels

      public Channel[] getLivePropertyChannels(String propertyName)
      Get the array of channels for the specified property
      Overrides:
      getLivePropertyChannels in class AcceleratorNode
    • getField

      public double getField()
      returns the field of the magnet (T /(m^ (n-1))), n=1 for dipole, 2 for quad etc.
    • getFieldInt

      public double getFieldInt()
      returns the integrated field of the magnet (T-m /(m^ (n-1))), n=1 for dipole, 2 for quad etc.