Class FieldMapFactory

java.lang.Object
xal.extension.jels.smf.impl.FieldMapFactory

public class FieldMapFactory extends Object
Factory class to get the right FieldMap subclass.
Author:
Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
  • Constructor Details

    • FieldMapFactory

      public FieldMapFactory()
  • Method Details

    • getInstances

      public static Map<String,FieldMap> getInstances()
    • putInstance

      public static void putInstance(String key, FieldMap fieldmap) throws FieldMapException
      Static factory method to add a field profile without the need to have it on disk.
      Parameters:
      key - key used to store the fieldmap
      fieldmap - The FieldMap object
      Throws:
      FieldMapException
    • putInstance

      public static void putInstance(String path, String filename, int numberOfPoints, FieldMap fieldmap) throws FieldMapException
      Static factory method to add a field profile without the need to have it on disk.
      Parameters:
      path - not necessarily a path, used as a key
      filename - not necessarily a filename, used as a key
      numberOfPoints - number of points to use for integration. It can be lower or higher than the number of points in the field map
      fieldmap - The FieldMap object
      Throws:
      FieldMapException
    • getInstance

      public static FieldMap getInstance(String path, String filename, boolean dynamic, FieldMapFactory.FieldType fieldType, int dimensions, int numberOfPoints)
      Static factory method to give field profile for a specific file
      Parameters:
      path - path to the field map file
      filename - file name without extension
      dynamic - whether the field changes over time or not
      fieldType - electric or magnetic
      dimensions - 1D, 2D, or 3D (only integer)
      numberOfPoints - number of points to use for integration. It can be lower or higher than the number of points in the field map
      Returns:
      field profile