Package xal.extension.jels.smf.impl
Class FieldMapFactory
java.lang.Object
xal.extension.jels.smf.impl.FieldMapFactory
Factory class to get the right
FieldMap
subclass.- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldMapgetInstance(String path, String filename, boolean dynamic, FieldMapFactory.FieldType fieldType, int dimensions, int numberOfPoints) Static factory method to give field profile for a specific filestatic voidputInstance(String path, String filename, int numberOfPoints, FieldMap fieldmap) Static factory method to add a field profile without the need to have it on disk.static voidputInstance(String key, FieldMap fieldmap) Static factory method to add a field profile without the need to have it on disk.
-
Constructor Details
-
FieldMapFactory
public FieldMapFactory()
-
-
Method Details
-
getInstances
-
putInstance
Static factory method to add a field profile without the need to have it on disk.- Parameters:
key- key used to store the fieldmapfieldmap- 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 keyfilename- not necessarily a filename, used as a keynumberOfPoints- number of points to use for integration. It can be lower or higher than the number of points in the field mapfieldmap- 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 filefilename- file name without extensiondynamic- whether the field changes over time or notfieldType- electric or magneticdimensions- 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
-