Package xal.model.probe.traj
Class SynchronousState
- All Implemented Interfaces:
IProbeState
,IArchive
- Author:
- Juan F. Esteban Müller <JuanF.EstebanMuller@ess.eu>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final String
protected static final String
protected static final String
Fields inherited from class xal.model.probe.traj.ProbeState
STATE_LABEL, TYPE_LABEL
Fields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.SynchronousState
(SynchronousProbe probe) Copy constructor.SynchronousState
(SynchronousState stateSync) Copy constructor for SynchronousState. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPropertiesTo
(DataAdaptor daptSink) Save the state values particular toBunchProbeState
objects to the data sink.copy()
Creates a new clone of this object.double
Return the energy gain in the current element.double
Return the synchronous phase.protected void
readPropertiesFrom
(DataAdaptor daptSrc) Recover the state values particular toBunchProbeState
objects from the data source.void
setEnergyGain
(double dblEnergyGain) Set the energy gain for the current element.void
setSynchronousPhase
(double dblPhase) Set synchronous phase.toString()
Write out state information to a string.Methods inherited from class xal.model.probe.traj.BunchProbeState
beamDCPerveance, beamPerveance, bunchCharge, getBeamCurrent, getBunchFrequency, setBeamCurrent, setBunchFrequency
Methods inherited from class xal.model.probe.traj.ProbeState
computeBetaFromGamma, computeGammaFromBeta, computeGammaFromW, getBeta, getBetaGamma, getElementId, getElementTypeId, getGamma, getHardwareNodeId, getKineticEnergy, getLongitudinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesRestEnergy, getTime, load, save, setElementId, setElementTypeId, setHardwareNodeId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesRestEnergy, setTime
-
Field Details
-
LABEL_SYNCH
- See Also:
-
ATTR_SYNCH_PHASE
- See Also:
-
ATTR_ENERGY_GAIN
- See Also:
-
-
Constructor Details
-
SynchronousState
public SynchronousState()Default constructor. Create a newSynchronousState
object with zero state values. -
SynchronousState
Copy constructor for SynchronousState. Initializes the newSynchronousState
objects with the state attributes of the givenSynchronousState
.- Parameters:
stateSync
- initializing state
-
SynchronousState
Copy constructor. Create a newSynchronousState
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
Description copied from class:ProbeState
Creates a new clone of this object.- Specified by:
copy
in classProbeState<SynchronousState>
- Returns:
- a deep copy of this object.
-
addPropertiesTo
Description copied from class:BunchProbeState
Save the state values particular toBunchProbeState
objects to the data sink.- Overrides:
addPropertiesTo
in classBunchProbeState<SynchronousState>
- Parameters:
daptSink
- data sink represented byDataAdaptor
interface
-
readPropertiesFrom
Description copied from class:BunchProbeState
Recover the state values particular toBunchProbeState
objects from the data source.- Overrides:
readPropertiesFrom
in classBunchProbeState<SynchronousState>
- Parameters:
daptSrc
- data source represented by aDataAdaptor
interface- Throws:
DataFormatException
- state information in data source is malformatted
-
toString
Description copied from class:BunchProbeState
Write out state information to a string.- Overrides:
toString
in classBunchProbeState<SynchronousState>
- Returns:
- text version of internal state data
-