Class OrbitCorrectionOperator
- Direct Known Subclasses:
AutomaticOrbitCorrectionOperator
Dynamic part of OrbitCorrection procedure, stores active state of procedure.
- Author:
- igor@scictrl.com
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enum for state of operation. -
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
If operator should send mail notification on serious problems. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Execute undo operation, if possible.boolean
canUndo()
Returnstrue
if undo operation can be executed.void
clearLastCorrections.void
fireProgressReported
(double progress, String message) fireProgressReported.getBPMonitors
(Orientation ori) getBPMonitors.Getter for the fieldcontroller
.double
getCorrectionScale.getCorrectors
(Orientation ori) getCorrectors.Returns orbit as it is currently loaded on Databush, returns immediatelly.getDataBush.getLastCorrectionH.getLastCorrectionV.Returns last orbit, which was requested/returned by this operator by callinggetNewOrbit()
orgetCurrentOrbit()
double
getMaxCorrectionValue.Getter for the fieldmessage
.getName()
Getter for the fieldname
.Returns orbit, which is newer than last returned orbit.Getter for the fieldresponseMatrix
.getState()
Getter for the fieldstate
.void
initialize
(String name, DataBush db, ElementList<AbstractCorrector>[] correctors, ElementList<BPMonitor>[] bpms, OrbitCorrectionController contrl) initialize.void
invalidateResponseMatrix.boolean
isSendMailNotification.boolean
isStateAborting.boolean
isStateActive.boolean
isStateApplying.boolean
isStateCalculating.boolean
isStateInactive.boolean
isStateStopping.boolean
isStateWaiting.protected void
sendMailNotification
(String message, String beamCurrent, Class<?> requestor, Throwable error) sendMailNotification.void
setLastCorrection
(Correction lastCorrection, Orientation ori) Setter for the fieldlastCorrection
.void
setSendMailNotification
(boolean sendMailNotification) Setter for the fieldsendMailNotification
.void
setState
(OrbitCorrectionOperator.State state, String message) Setter for the fieldstate
.void
setStateActive.void
setStateActive
(String message) setStateActive.void
setStateApplying.void
setStateApplying
(String message) setStateApplying.void
setStateCalculating.void
setStateWaiting.void
setStateWaiting
(String message) setStateWaiting.
-
Field Details
-
sendMailNotification
protected boolean sendMailNotificationIf operator should send mail notification on serious problems.
-
-
Constructor Details
-
OrbitCorrectionOperator
public OrbitCorrectionOperator()Constructor for OrbitCorrectionOperator.
-
-
Method Details
-
getController
Getter for the field
controller
.- Returns:
- a
OrbitCorrectionController
object
-
getCorrectionScale
public double getCorrectionScale()getCorrectionScale.
- Returns:
- a double
-
getLastCorrectionH
getLastCorrectionH.
- Returns:
- a
Correction
object
-
setLastCorrection
Setter for the field
lastCorrection
.- Parameters:
lastCorrection
- aCorrection
objectori
- aOrientation
object
-
getLastCorrectionV
getLastCorrectionV.
- Returns:
- a
Correction
object
-
clearLastCorrections
public void clearLastCorrections()clearLastCorrections.
-
getBPMonitors
getBPMonitors.
- Parameters:
ori
- aOrientation
object- Returns:
- boolean
-
getCorrectors
getCorrectors.
- Parameters:
ori
- aOrientation
object- Returns:
- boolean
-
getDataBush
getDataBush.
- Returns:
- DataBush
-
getMaxCorrectionValue
public double getMaxCorrectionValue()getMaxCorrectionValue.
- Returns:
- double
-
getName
Getter for the field
name
.- Returns:
- java.lang.String
-
getResponseMatrix
Getter for the field
responseMatrix
.- Parameters:
ori
- aOrientation
object- Returns:
- a
ResponseMatrix
object
-
initialize
public void initialize(String name, DataBush db, ElementList<AbstractCorrector>[] correctors, ElementList<BPMonitor>[] bpms, OrbitCorrectionController contrl) initialize.
- Parameters:
name
- aString
objectdb
- aDataBush
objectcorrectors
- an array ofElementList
objectsbpms
- an array ofElementList
objectscontrl
- aOrbitCorrectionController
object
-
getNewOrbit
Returns orbit, which is newer than last returned orbit. If necessary blocks this call and waits up to one second for new orbit event. If within one second there is no new orbit event, it stops waiting and returns whatever is current orbit. blocks until new orbit is available- Returns:
- a
Orbit
object
-
getCurrentOrbit
Returns orbit as it is currently loaded on Databush, returns immediatelly.- Returns:
- current orbit
-
getLastOrbit
Returns last orbit, which was requested/returned by this operator by callinggetNewOrbit()
orgetCurrentOrbit()
- Returns:
- last orbit returned by this operator
-
getState
Getter for the field
state
.- Returns:
- a
OrbitCorrectionOperator.State
object
-
getMessage
Getter for the field
message
.- Returns:
- a
String
object
-
isStateActive
public boolean isStateActive()isStateActive.
- Returns:
- a boolean
-
setStateActive
public void setStateActive()setStateActive.
-
setStateActive
setStateActive.
- Parameters:
message
- aString
object
-
isStateStopping
public boolean isStateStopping()isStateStopping.
- Returns:
- a boolean
-
setStateCalculating
public void setStateCalculating()setStateCalculating.
-
isStateCalculating
public boolean isStateCalculating()isStateCalculating.
- Returns:
- a boolean
-
setStateApplying
public void setStateApplying()setStateApplying.
-
setStateApplying
setStateApplying.
- Parameters:
message
- aString
object
-
isStateApplying
public boolean isStateApplying()isStateApplying.
- Returns:
- a boolean
-
isStateAborting
public boolean isStateAborting()isStateAborting.
- Returns:
- a boolean
-
isStateInactive
public boolean isStateInactive()isStateInactive.
- Returns:
- a boolean
-
isStateWaiting
public boolean isStateWaiting()isStateWaiting.
- Returns:
- a boolean
-
setStateWaiting
public void setStateWaiting()setStateWaiting.
-
setStateWaiting
setStateWaiting.
- Parameters:
message
- aString
object
-
setState
Setter for the field
state
.- Parameters:
state
- the state to setmessage
- aString
object
-
invalidateResponseMatrix
public void invalidateResponseMatrix()invalidateResponseMatrix.
-
fireProgressReported
fireProgressReported.
- Parameters:
progress
- a doublemessage
- aString
object
-
sendMailNotification
protected void sendMailNotification(String message, String beamCurrent, Class<?> requestor, Throwable error) sendMailNotification.
-
setSendMailNotification
public void setSendMailNotification(boolean sendMailNotification) Setter for the field
sendMailNotification
.- Parameters:
sendMailNotification
- a boolean
-
isSendMailNotification
public boolean isSendMailNotification()isSendMailNotification.
- Returns:
- a boolean
-
applyUndo
public void applyUndo()Execute undo operation, if possible.
-
canUndo
public boolean canUndo()Returnstrue
if undo operation can be executed.- Returns:
true
if undo operation can be executed
-