Class AbstractOpticalElement
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
- All Implemented Interfaces:
Cloneable
,ISimpleElement
- Direct Known Subclasses:
AbstractTransferElement
,BPMonitor
,Marker
This class is base for all optical elements. This elements are positioned on the orbit
and have basic optics parameters:
- position on the orbit
machine functions: beta, alpha, phase
- Author:
- igor@scictrl.com
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ConstantPR_POSITION=2
static final int
ConstantPR_REL_FROM=4
static final int
ConstantPR_REL_POSITION=3
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
lastActionResult, owner, PR_ELEMENT_NAME, PR_VIRTUAL
-
Constructor Summary
ConstructorDescriptionAbstractOpticalElement
(String name) Constructs an optical element with specified name and default parameters vauesAbstractOpticalElement
(String name, boolean virtual, double position, double relpos, String relFrom) Constructs the optical element with specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns the clone of this element.getAlpha()
This method return machine function alpha.getBeta()
This method return machine function beta.This method return machine function dispersion.int
getIndex()
This method return index of element which represent position in current collection.double
This method return absolute position of element.getQ()
This method return beam normalised phase.This method return name of element, which is reference for this element for measuring relative position.double
This method return relative position of element.void
setPosition
(double value) Sets position from beginnign point.void
setRelFrom
(String newValue) Sets name of element to which is relative position referencing.void
setRelPosition
(double newValue) Sets the relative position to relative form element.void
Sets parameters values of this element to those in parameter array.toString()
Returns the string representation of this element.Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
descriptor, elType, equals, getLastActionResult, getName, getOwner, getVirtual, hashCode, isInitialized, isVirtual, setVirtual, throwISE
-
Field Details
-
PR_POSITION
public static final int PR_POSITIONConstantPR_POSITION=2
- See Also:
-
PR_REL_POSITION
public static final int PR_REL_POSITIONConstantPR_REL_POSITION=3
- See Also:
-
PR_REL_FROM
public static final int PR_REL_FROMConstantPR_REL_FROM=4
- See Also:
-
-
Constructor Details
-
AbstractOpticalElement
Constructs an optical element with specified name and default parameters vaues- Parameters:
name
- aString
object
-
AbstractOpticalElement
public AbstractOpticalElement(String name, boolean virtual, double position, double relpos, String relFrom) Constructs the optical element with specified parameters.
-
-
Method Details
-
clone
Returns the clone of this element. Returns not initialized clone of this element. All data is copied to the clone. Returns not initialized clone of this element. All data is copied to the clone.- Specified by:
clone
in interfaceISimpleElement
- Overrides:
clone
in classAbstractDataBushElement
- Returns:
- a
Object
the clone of this element.
-
getAlpha
This method return machine function alpha. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.- Returns:
- a
PositionedData
object - See Also:
-
getBeta
This method return machine function beta. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.- Returns:
- a
PositionedData
object - See Also:
-
getDispersion
This method return machine function dispersion. If the dimension of element in direction of orbit is not infinitly small, this function return value of function in the center of element.- Returns:
- a
DispersionData
object - See Also:
-
getIndex
public int getIndex()This method return index of element which represent position in current collection.- Returns:
- a int
-
getPosition
public double getPosition()This method return absolute position of element.- Returns:
- a double
-
getQ
This method return beam normalised phase.- Returns:
- a
PositionedData
object
-
getRelFrom
This method return name of element, which is reference for this element for measuring relative position.- Returns:
java.lang.String
name of reference element- See Also:
-
getRelPosition
public double getRelPosition()This method return relative position of element. For reference element see:- Returns:
- a double
- See Also:
-
setPosition
Sets position from beginnign point. This operation is valid only when DataBush is ACCESS_ALL_DATA mode, otherwize IllegalAccessException DataBush EXPERIMENTAL mode.- Parameters:
value
- a double- Throws:
IllegalStateException
- if any.
-
setRelFrom
Sets name of element to which is relative position referencing. This operation is valid only if DataBush is in ACCESS_ALL_DATA mode. Otherwize IllegalAccessException is thrown.- Parameters:
newValue
- java.lang.String- Throws:
IllegalStateException
- if any.
-
setRelPosition
Sets the relative position to relative form element. This operation is valid only if DataBush is in ACCESS_ALL_DATA mode. Otherwize IllegalAccessException is thrown.- Parameters:
newValue
- java.lang.String- Throws:
IllegalStateException
- if any.
-
setWith
Sets parameters values of this element to those in parameter array. As parameter must be used such array as for dynamical construction of new instance of this class. Current values are overriden for each notnull
object in array.setWith.
- Overrides:
setWith
in classAbstractDataBushElement
- Parameters:
par
- an array ofObject
objects- Throws:
IllegalStateException
- if element is initialized and inside DataBush.- See Also:
-
toString
Returns the string representation of this element. Returns string describing this element. String is formated in input-file code. Returns a String that represents the value of this object.- Specified by:
toString
in interfaceISimpleElement
- Overrides:
toString
in classAbstractDataBushElement
-