Class SynchronousState

All Implemented Interfaces:
IProbeState, IArchive

public class SynchronousState extends BunchProbeState<SynchronousState>
Author:
Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
  • Field Details

  • Constructor Details

    • SynchronousState

      public SynchronousState()
      Default constructor. Create a new SynchronousState object with zero state values.
    • SynchronousState

      public SynchronousState(SynchronousState stateSync)
      Copy constructor for SynchronousState. Initializes the new SynchronousState objects with the state attributes of the given SynchronousState.
      Parameters:
      stateSync - initializing state
    • SynchronousState

      public SynchronousState(SynchronousProbe probe)
      Copy constructor. Create a new SynchronousState object and initialize the state to that of the specified probe argument.
      Parameters:
      probe - probe containing initializing state information
  • Method Details

    • setSynchronousPhase

      public void setSynchronousPhase(double dblPhase)
      Set synchronous phase.
      Parameters:
      dblPhase - synchronous phase in radians
    • getSynchronousPhase

      public double getSynchronousPhase()
      Return the synchronous phase.
      Returns:
      synchronous phase in radians
    • setEnergyGain

      public void setEnergyGain(double dblEnergyGain)
      Set the energy gain for the current element.
      Parameters:
      dblEnergyGain - energy gain in eV
    • getEnergyGain

      public double getEnergyGain()
      Return the energy gain in the current element.
      Returns:
      energy gain in eV
    • copy

      public SynchronousState copy()
      Description copied from class: ProbeState
      Creates a new clone of this object.
      Specified by:
      copy in class ProbeState<SynchronousState>
      Returns:
      a deep copy of this object.
    • addPropertiesTo

      protected void addPropertiesTo(DataAdaptor daptSink)
      Description copied from class: BunchProbeState
      Save the state values particular to BunchProbeState objects to the data sink.
      Overrides:
      addPropertiesTo in class BunchProbeState<SynchronousState>
      Parameters:
      daptSink - data sink represented by DataAdaptor interface
    • readPropertiesFrom

      protected void readPropertiesFrom(DataAdaptor daptSrc) throws DataFormatException
      Description copied from class: BunchProbeState
      Recover the state values particular to BunchProbeState objects from the data source.
      Overrides:
      readPropertiesFrom in class BunchProbeState<SynchronousState>
      Parameters:
      daptSrc - data source represented by a DataAdaptor interface
      Throws:
      DataFormatException - state information in data source is malformatted
    • toString

      public String toString()
      Description copied from class: BunchProbeState
      Write out state information to a string.
      Overrides:
      toString in class BunchProbeState<SynchronousState>
      Returns:
      text version of internal state data