Package xal.extension.jels.model.elem
Class JElsElementMapping
java.lang.Object
xal.sim.scenario.ElementMapping
xal.extension.jels.model.elem.JElsElementMapping
The default element mapping implemented as singleton.
- Author:
- Ivo List
-
Field Summary
FieldsFields inherited from class xal.sim.scenario.ElementMapping
bolDebug, bolDivMags, bolSubsectionCtrOrigin, elementMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateDefaultDrift
(String name, double len) Different model may have different implementation of the drift element.createRfCavityDrift
(String name, double len, double freq, double mode) Creates a drift space within an RF cavity structure.Class<? extends IComponent>
Default converter should produce a general model element like a Marker.Class<? extends IComposite>
Returns the default class type used to model accelerator sequences.Class<? extends IComponent>
static ElementMapping
Returns the default element mapping.Class<? extends IComponent>
protected void
Methods inherited from class xal.sim.scenario.ElementMapping
getModelElementType, getModelSequenceType, isDebugging, isMagnetDivided, isSubsectionAxisOriginCentered, putMap, removeMap, setDebug, setDivideMagnetFlag
-
Field Details
-
instance
-
-
Constructor Details
-
JElsElementMapping
public JElsElementMapping()
-
-
Method Details
-
getInstance
Returns the default element mapping.- Returns:
- the default element mapping
-
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 classElementMapping
- Returns:
- default class type used when none is defined
-
createDefaultDrift
Description copied from class:ElementMapping
Different model may have different implementation of the drift element.- Specified by:
createDefaultDrift
in classElementMapping
- 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 classElementMapping
- Parameters:
name
- string identifier of the drift spacelen
- length of drift space (meters)freq
- design frequency of the enclosing RF cavitymode
- 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
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 classElementMapping
- Returns:
- default class type used to model hardware sequences
-
getDriftType
- Specified by:
getDriftType
in classElementMapping
-
getRfCavityDriftType
- Specified by:
getRfCavityDriftType
in classElementMapping
-