Class JElsElementMapping

java.lang.Object
xal.sim.scenario.ElementMapping
xal.extension.jels.model.elem.JElsElementMapping

public class JElsElementMapping extends ElementMapping
The default element mapping implemented as singleton.
Author:
Ivo List
  • Field Details

  • Constructor Details

    • JElsElementMapping

      public JElsElementMapping()
  • Method Details

    • getInstance

      public static ElementMapping getInstance()
      Returns the default element mapping.
      Returns:
      the default element mapping
    • getDefaultElementType

      public Class<? extends IComponent> getDefaultElementType()
      Description copied from class: ElementMapping
      Default converter should produce a general model element like a Marker. It is used when no other class associations have been found.
      Specified by:
      getDefaultElementType in class ElementMapping
      Returns:
      default class type used when none is defined
    • createDefaultDrift

      public IComponent createDefaultDrift(String name, double len)
      Description copied from class: ElementMapping
      Different model may have different implementation of the drift element.
      Specified by:
      createDefaultDrift in class ElementMapping
      Returns:
      drift model element
    • createRfCavityDrift

      public IComponent createRfCavityDrift(String name, double len, double freq, double mode) throws ModelException
      Description copied from class: ElementMapping
      Creates a drift space within an RF cavity structure. Such drifts have extra parameters needed to compute the probe's longitudinal phase advance. These parameters are derived from the cavity's design parameters and do not need to be synchronized.
      Specified by:
      createRfCavityDrift in class ElementMapping
      Parameters:
      name - string identifier of the drift space
      len - length of drift space (meters)
      freq - design frequency of the enclosing RF cavity
      mode - structure mode coupling the cavities within the tank
      Returns:
      a new RF cavity drift space
      Throws:
      ModelException - an exception occurred while constructing the element
    • initialize

      protected void initialize()
    • getDefaultSequenceType

      public Class<? extends IComposite> getDefaultSequenceType()
      Description copied from class: ElementMapping
      Returns the default class type used to model accelerator sequences. This value is used when none has been defined for a specific hardware sequence (e.g., a super conduction cavity, coupled cavity linac, etc.).
      Specified by:
      getDefaultSequenceType in class ElementMapping
      Returns:
      default class type used to model hardware sequences
    • getDriftType

      public Class<? extends IComponent> getDriftType()
      Specified by:
      getDriftType in class ElementMapping
    • getRfCavityDriftType

      public Class<? extends IComponent> getRfCavityDriftType()
      Specified by:
      getRfCavityDriftType in class ElementMapping