Package xal.model

Class Lattice

All Implemented Interfaces:
Iterable<IComponent>, IComponent, IComposite

public class Lattice extends ElementSeq
High-level container representing a machine model.
Author:
Christopher K. Allen, Craig McChesney
  • Field Details

    • SIZE_DEF_RESERVE

      public static final int SIZE_DEF_RESERVE
      default number of element positions to reserve in list array
      See Also:
    • TYPE

      public static final String TYPE
      the string type identifier for all Lattice objects
      See Also:
  • Constructor Details

    • Lattice

      public Lattice()
      Creates a new instance of Lattice
    • Lattice

      public Lattice(String strId)
      Creates a new instance of Lattice
      Parameters:
      strId - identifier of the lattice
    • Lattice

      public Lattice(String strId, int szReserve)
      Creates a new instance of Lattice and reserves space for a szReserve length lattice.
      Parameters:
      strId - identifier of the lattice
      szReserve - number of Element spaces to reserve
  • Method Details

    • setVersion

      public void setVersion(String strVersion)
      Sets the version tag
      Parameters:
      strVersion - revision number of lattice
    • setAuthor

      public void setAuthor(String strAuthor)
      Sets the author tag
      Parameters:
      strAuthor - author of lattice description
    • setDate

      public void setDate(String strDate)
      Sets the date tag
      Parameters:
      strDate - date string of lattice description
    • getVersion

      public String getVersion()
      Get the version of the lattice
      Returns:
      lattice revision number
    • getAuthor

      public String getAuthor()
      Get the author of the lattice definition
      Returns:
      lattice author
    • getDate

      public String getDate()
      Get the date of lattice description
      Returns:
      lattice model date
    • getRings

      @Deprecated public List<RingModel> getRings()
      Deprecated.
      This method is never used
      Return a list of the RingModel objects contained in this model.
      Returns:
      ordered list of all RingModel objects within model
    • getLines

      @Deprecated public List<LineModel> getLines()
      Deprecated.
      This method is never used.
      Return a list of the LineModel objects contained in this model.
      Returns:
      ordered list of all LineModel objects within model
    • backPropagate

      public void backPropagate(IProbe probe) throws ModelException

      Backward propagation of a probe through the lattice.

      The probe is first initialized by calling the initialize() method of the probe then updated by calling the update() method in order to save the initial state of the probe into its trajectory.

      NOTES: CKA
      · Support for backward propagation February, 2009.
      · You must use the proper algorithm object for this method to work correctly!

      Specified by:
      backPropagate in interface IComponent
      Overrides:
      backPropagate in class ElementSeq
      Parameters:
      probe - the state of the probe will be advance using the elements dynamics
      Throws:
      ModelException - an error occurred while advancing the probe state
    • asDocument

      public Document asDocument() throws IOException
      Returns a DOM document for the lattice.
      Returns:
      a DOM document for the lattice
      Throws:
      IOException - I guess this is thrown when LatticeXmlWriter is unable to parse this lattice
    • print

      public void print(PrintWriter os)
      Dump current state and content to output stream.
      Overrides:
      print in class ElementSeq
      Parameters:
      os - output stream object