Class AbstractCorrector
java.lang.Object
org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractMagnetElement
org.scictrl.mp.orbitcorrect.model.optics.AbstractCalibratedMagnet
org.scictrl.mp.orbitcorrect.model.optics.AbstractCorrector
- All Implemented Interfaces:
Cloneable
,ISimpleElement
,AbstractUpdateableElement
,IApplyableElement
- Direct Known Subclasses:
HorCorrector
,Kicker
,VerCorrector
AbstractCorrector
steers magnet, which gives kick to the beam, specified by the angle.- Author:
- igor@scictrl.com
-
Field Summary
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractCalibratedMagnet
calc, calibrationEntry, current, dataInvalidated, PR_CALIBRATION_ENTRY
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractMagnetElement
PR_POWER_SUPPLY, psH
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
length, matrices, matrix, PR_LENGTH
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
PR_POSITION, PR_REL_FROM, PR_REL_POSITION
Fields inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractDataBushElement
lastActionResult, owner, PR_ELEMENT_NAME, PR_VIRTUAL
-
Constructor Summary
ConstructorDescriptionAbstractCorrector
(String name) ConstructsAbstractCorrector
with specified name and default parameter's values.AbstractCorrector
(String name, boolean virtual, double position, double relpos, String relFrom, double length, String ps, String calibrationEntry, double angle) Constructs theAbstractCorrector
with specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToAngle
(double value) This method increment the angle for a value specified by parameterint
This method sends current toPowerSupply
clone()
Returns the clone of this element.double
getAngle()
This method return angle of change beam path.double
This method return maximal angle of change beam path, that can be caused by this element.double
This method return minimal angle of change beam path, that can be caused by this element.void
setAngle
(double value) This method sets angle of change beam path.void
setCurrent
(double value) This method sets current on this element.void
Sets parameters values of this element to those in parameter array.toString()
Returns the string representation of this element.int
update()
Reads value from associated element or Abean and calculates it's new values.Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractCalibratedMagnet
getCalibrationEntry, getCurrent, invalidateData, isDataInvalidated, updateMatrices
Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractMagnetElement
getPowerSupply, getPS
Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractTransferElement
getAlpha1, getAlpha2, getBeta1, getBeta2, getDispersion1, getDispersion2, getLength, getMatrix, getQ1, getQ2, newMatrix, newMatrix, setLength
Methods inherited from class org.scictrl.mp.orbitcorrect.model.optics.AbstractOpticalElement
getAlpha, getBeta, getDispersion, getIndex, getPosition, getQ, getRelFrom, getRelPosition, setPosition, setRelFrom, setRelPosition
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_ANGLE
public static final int PR_ANGLEConstantPR_ANGLE=8
- See Also:
-
-
Constructor Details
-
AbstractCorrector
ConstructsAbstractCorrector
with specified name and default parameter's values.- Parameters:
name
- aString
the name of abstract corrector
-
AbstractCorrector
public AbstractCorrector(String name, boolean virtual, double position, double relpos, String relFrom, double length, String ps, String calibrationEntry, double angle) Constructs theAbstractCorrector
with specified parameters.
-
-
Method Details
-
addToAngle
public void addToAngle(double value) This method increment the angle for a value specified by parameter- Parameters:
value
- a double
-
applyAngle
This method sends current toPowerSupply
- Returns:
int
indicate if method succeded- Throws:
IllegalStateException
- if any.
-
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.clone.
clone.
- Specified by:
clone
in interfaceISimpleElement
- Overrides:
clone
in classAbstractTransferElement
- Returns:
- a
Object
the clone of this element. - See Also:
-
getAngle
public double getAngle()This method return angle of change beam path.- Returns:
- a double
-
getMaxAngle
This method return maximal angle of change beam path, that can be caused by this element.- Returns:
- a double
- Throws:
IllegalStateException
- if any.ControlSystemException
- if any.
-
getMinAngle
This method return minimal angle of change beam path, that can be caused by this element.- Returns:
- a double
- Throws:
IllegalStateException
- if any.ControlSystemException
- if any.
-
setAngle
public void setAngle(double value) This method sets angle of change beam path.- Parameters:
value
- a double
-
setCurrent
public void setCurrent(double value) This method sets current on this element. This method sets current.- Overrides:
setCurrent
in classAbstractCalibratedMagnet
- Parameters:
value
- a double
-
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.
setWith.
setWith.
setWith.
setWith.
- Overrides:
setWith
in classAbstractCalibratedMagnet
- 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.toString.
toString.
toString.
toString.
- Specified by:
toString
in interfaceISimpleElement
- Overrides:
toString
in classAbstractCalibratedMagnet
- See Also:
-
update
Reads value from associated element or Abean and calculates it's new values. Metod reads data from other databush elements or from remote devices represented with Abean. Metod also checksisDataInvalidated()
on depending databush elements, if value has changed. Return value is identification code of error. Note! Update is performed only if virtual flag is set tofalse
. Note! All update methods are synchronized, so only one update is called at time. For update od group of elements call update on appropriate element-list or DataBush. This method reads energy fromPowerSupply
and transform it to magnetic properties of this element.- Returns:
- a int the return code indicating success
- Throws:
IllegalStateException
- thrown if status of DataBush equalsDB_EMPTY
DataBushPackedException
- contains all exception thrown or caught during updating element
-