Class AbstractOpticalElement

java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
All Implemented Interfaces:
Cloneable, ISimpleElement
Direct Known Subclasses:
AbstractTransferElement, BPMonitor, Marker

public abstract class AbstractOpticalElement extends AbstractDataBushElement
This class is base for all optical elements. This elements are positioned on the orbit and have basic optics parameters:
  • position on the orbit
  • machine functions: beta, alpha, phase
Author:
igor@scictrl.com
  • Field Details

    • PR_POSITION

      public static final int PR_POSITION
      Constant PR_POSITION=2
      See Also:
    • PR_REL_POSITION

      public static final int PR_REL_POSITION
      Constant PR_REL_POSITION=3
      See Also:
    • PR_REL_FROM

      public static final int PR_REL_FROM
      Constant PR_REL_FROM=4
      See Also:
  • Constructor Details

    • AbstractOpticalElement

      public AbstractOpticalElement(String name)
      Constructs an optical element with specified name and default parameters vaues
      Parameters:
      name - a String object
    • AbstractOpticalElement

      public AbstractOpticalElement(String name, boolean virtual, double position, double relpos, String relFrom)
      Constructs the optical element with specified parameters.
      Parameters:
      name - a String object
      virtual - a boolean
      position - a double
      relpos - a double
      relFrom - a String object
  • Method Details

    • clone

      public Object clone()
      Returns the clone of this element. Returns not initialized clone of this element. All data is copied to the clone. Returns not initialized clone of this element. All data is copied to the clone.
      Specified by:
      clone in interface ISimpleElement
      Overrides:
      clone in class AbstractDataBushElement
      Returns:
      a Object the clone of this element.
    • getAlpha

      public PositionedData getAlpha()
      This method return machine function alpha. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.
      Returns:
      a PositionedData object
      See Also:
      • invalid reference
        anka.databush.PositionedData
    • getBeta

      public PositionedData getBeta()
      This method return machine function beta. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.
      Returns:
      a PositionedData object
      See Also:
      • invalid reference
        anka.databush.PositionedData
    • getDispersion

      public DispersionData getDispersion()
      This method return machine function dispersion. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.
      Returns:
      a DispersionData object
      See Also:
      • invalid reference
        anka.databush.DispersionData
    • getIndex

      public int getIndex()
      This method return index of element which represent position in current collection.
      Returns:
      a int
    • getPosition

      public double getPosition()
      This method return absolute position of element.
      Returns:
      a double
    • getQ

      public PositionedData getQ()
      This method return beam normalised phase.
      Returns:
      a PositionedData object
    • getRelFrom

      public String getRelFrom()
      This method return name of element, which is reference for this element for measuring relative position.
      Returns:
      java.lang.String name of reference element
      See Also:
    • getRelPosition

      public double getRelPosition()
      This method return relative position of element. For reference element see:
      Returns:
      a double
      See Also:
    • setPosition

      public void setPosition(double value) throws IllegalStateException
      Sets position from beginnign point. This operation is valid only when DataBush is ACCESS_ALL_DATA mode, otherwize IllegalAccessException DataBush EXPERIMENTAL mode.
      Parameters:
      value - a double
      Throws:
      IllegalStateException - if any.
    • setRelFrom

      public void setRelFrom(String newValue) throws IllegalStateException
      Sets name of element to which is relative position referencing. This operation is valid only if DataBush is in ACCESS_ALL_DATA mode. Otherwize IllegalAccessException is thrown.
      Parameters:
      newValue - java.lang.String
      Throws:
      IllegalStateException - if any.
    • setRelPosition

      public void setRelPosition(double newValue) throws IllegalStateException
      Sets the relative position to relative form element. This operation is valid only if DataBush is in ACCESS_ALL_DATA mode. Otherwize IllegalAccessException is thrown.
      Parameters:
      newValue - java.lang.String
      Throws:
      IllegalStateException - if any.
    • setWith

      public void setWith(Object[] par) throws IllegalStateException
      Sets parameters values of this element to those in parameter array. As parameter must be used such array as for dynamical construction of new instance of this class. Current values are overriden for each not null object in array.

      setWith.

      Overrides:
      setWith in class AbstractDataBushElement
      Parameters:
      par - an array of Object objects
      Throws:
      IllegalStateException - if element is initialized and inside DataBush.
      See Also:
    • toString

      public String toString()
      Returns the string representation of this element. Returns string describing this element. String is formated in input-file code. Returns a String that represents the value of this object.
      Specified by:
      toString in interface ISimpleElement
      Overrides:
      toString in class AbstractDataBushElement