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 Stringprotected static final Stringprotected static final StringFields inherited from class xal.model.probe.traj.ProbeState
STATE_LABEL, TYPE_LABELFields 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 voidaddPropertiesTo(DataAdaptor daptSink) Save the state values particular toBunchProbeStateobjects to the data sink.copy()Creates a new clone of this object.doubleReturn the energy gain in the current element.doubleReturn the synchronous phase.protected voidreadPropertiesFrom(DataAdaptor daptSrc) Recover the state values particular toBunchProbeStateobjects from the data source.voidsetEnergyGain(double dblEnergyGain) Set the energy gain for the current element.voidsetSynchronousPhase(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, setBunchFrequencyMethods 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 newSynchronousStateobject with zero state values. -
SynchronousState
Copy constructor for SynchronousState. Initializes the newSynchronousStateobjects with the state attributes of the givenSynchronousState.- Parameters:
stateSync- initializing state
-
SynchronousState
Copy constructor. Create a newSynchronousStateobject 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:ProbeStateCreates a new clone of this object.- Specified by:
copyin classProbeState<SynchronousState>- Returns:
- a deep copy of this object.
-
addPropertiesTo
Description copied from class:BunchProbeStateSave the state values particular toBunchProbeStateobjects to the data sink.- Overrides:
addPropertiesToin classBunchProbeState<SynchronousState>- Parameters:
daptSink- data sink represented byDataAdaptorinterface
-
readPropertiesFrom
Description copied from class:BunchProbeStateRecover the state values particular toBunchProbeStateobjects from the data source.- Overrides:
readPropertiesFromin classBunchProbeState<SynchronousState>- Parameters:
daptSrc- data source represented by aDataAdaptorinterface- Throws:
DataFormatException- state information in data source is malformatted
-
toString
Description copied from class:BunchProbeStateWrite out state information to a string.- Overrides:
toStringin classBunchProbeState<SynchronousState>- Returns:
- text version of internal state data
-