Class OrbitCorrectionOperator

java.lang.Object
org.scictrl.mp.orbitcorrect.correction.OrbitCorrectionOperator
Direct Known Subclasses:
AutomaticOrbitCorrectionOperator

public class OrbitCorrectionOperator extends Object

Dynamic part of OrbitCorrection procedure, stores active state of procedure.

Author:
igor@scictrl.com
  • Field Details

    • sendMailNotification

      protected boolean sendMailNotification
      If operator should send mail notification on serious problems.
  • Constructor Details

    • OrbitCorrectionOperator

      public OrbitCorrectionOperator()

      Constructor for OrbitCorrectionOperator.

  • Method Details

    • getController

      public OrbitCorrectionController getController()

      Getter for the field controller.

      Returns:
      a OrbitCorrectionController object
    • getCorrectionScale

      public double getCorrectionScale()

      getCorrectionScale.

      Returns:
      a double
    • getLastCorrectionH

      public Correction getLastCorrectionH()

      getLastCorrectionH.

      Returns:
      a Correction object
    • setLastCorrection

      public void setLastCorrection(Correction lastCorrection, Orientation ori)

      Setter for the field lastCorrection.

      Parameters:
      lastCorrection - a Correction object
      ori - a Orientation object
    • getLastCorrectionV

      public Correction getLastCorrectionV()

      getLastCorrectionV.

      Returns:
      a Correction object
    • clearLastCorrections

      public void clearLastCorrections()

      clearLastCorrections.

    • getBPMonitors

      public ElementList<BPMonitor> getBPMonitors(Orientation ori)

      getBPMonitors.

      Parameters:
      ori - a Orientation object
      Returns:
      boolean
    • getCorrectors

      public ElementList<AbstractCorrector> getCorrectors(Orientation ori)

      getCorrectors.

      Parameters:
      ori - a Orientation object
      Returns:
      boolean
    • getDataBush

      public DataBush getDataBush()

      getDataBush.

      Returns:
      DataBush
    • getMaxCorrectionValue

      public double getMaxCorrectionValue()

      getMaxCorrectionValue.

      Returns:
      double
    • getName

      public String getName()

      Getter for the field name.

      Returns:
      java.lang.String
    • getResponseMatrix

      public ResponseMatrix getResponseMatrix(Orientation ori)

      Getter for the field responseMatrix.

      Parameters:
      ori - a Orientation object
      Returns:
      a ResponseMatrix object
    • initialize

      public void initialize(String name, DataBush db, ElementList<AbstractCorrector>[] correctors, ElementList<BPMonitor>[] bpms, OrbitCorrectionController contrl)

      initialize.

      Parameters:
      name - a String object
      db - a DataBush object
      correctors - an array of ElementList objects
      bpms - an array of ElementList objects
      contrl - a OrbitCorrectionController object
    • getNewOrbit

      public Orbit 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

      public Orbit getCurrentOrbit()
      Returns orbit as it is currently loaded on Databush, returns immediatelly.
      Returns:
      current orbit
    • getLastOrbit

      public Orbit getLastOrbit()
      Returns last orbit, which was requested/returned by this operator by calling getNewOrbit() or getCurrentOrbit()
      Returns:
      last orbit returned by this operator
    • getState

      public OrbitCorrectionOperator.State getState()

      Getter for the field state.

      Returns:
      a OrbitCorrectionOperator.State object
    • getMessage

      public String getMessage()

      Getter for the field message.

      Returns:
      a String object
    • isStateActive

      public boolean isStateActive()

      isStateActive.

      Returns:
      a boolean
    • setStateActive

      public void setStateActive()

      setStateActive.

    • setStateActive

      public void setStateActive(String message)

      setStateActive.

      Parameters:
      message - a String 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

      public void setStateApplying(String message)

      setStateApplying.

      Parameters:
      message - a String 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

      public void setStateWaiting(String message)

      setStateWaiting.

      Parameters:
      message - a String object
    • setState

      public void setState(OrbitCorrectionOperator.State state, String message)

      Setter for the field state.

      Parameters:
      state - the state to set
      message - a String object
    • invalidateResponseMatrix

      public void invalidateResponseMatrix()

      invalidateResponseMatrix.

    • fireProgressReported

      public void fireProgressReported(double progress, String message)

      fireProgressReported.

      Parameters:
      progress - a double
      message - a String object
    • sendMailNotification

      protected void sendMailNotification(String message, String beamCurrent, Class<?> requestor, Throwable error)

      sendMailNotification.

      Parameters:
      message - a String object
      beamCurrent - a String object
      requestor - a Class object
      error - a Throwable object
    • 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()
      Returns true if undo operation can be executed.
      Returns:
      true if undo operation can be executed