Package xal.model.probe.traj
Class DiagnosticProbeState
- All Implemented Interfaces:
IProbeState
,IArchive
Encapsulates the state of a
DiagnosticProbe
at a particular
point in time.- Version:
- June 26, 2014
- Author:
- Craig McChesney, Christopher K. Allen
-
Field Summary
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
ConstructorsConstructorDescriptionCreates a newDiagnosticProbeState
.Creates a newDiagnosticProbeState
with the state initialized from the givenDiagnosticProbe
.DiagnosticProbeState
(DiagnosticProbeState diagnosticProbeState) Copy constructor for DiagnosticProbeState. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addPropertiesTo
(DataAdaptor container) Save the state information to aDataAdaptor
interface.copy()
Implements the clone operation required by the base classProbeState
.int
Returns the number of elements traversed by probe at this state.void
Increments the number of element traversed by 1.protected void
readPropertiesFrom
(DataAdaptor container) Recover the state information from aDataAdaptor
interface.void
setElementsVisited
(int n) Set the element count to the given number.toString()
Returns a representation of the internal state as a string.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
-
Constructor Details
-
DiagnosticProbeState
public DiagnosticProbeState()Creates a newDiagnosticProbeState
.- Since:
- Apr 19, 2011
-
DiagnosticProbeState
Copy constructor for DiagnosticProbeState. Initializes the newDisagnosticProbeState
objects with the state attributes of the givenDiagnosticProbeState
.- Parameters:
diagnosticProbeState
- initializing state- Since:
- Jun 26, 2014
-
DiagnosticProbeState
Creates a newDiagnosticProbeState
with the state initialized from the givenDiagnosticProbe
.- Since:
- Apr 19, 2011
-
-
Method Details
-
getElementsVisited
public int getElementsVisited()Returns the number of elements traversed by probe at this state.- Returns:
- number of model elements propagated by probe
- Since:
- Apr 19, 2011
-
setElementsVisited
public void setElementsVisited(int n) Set the element count to the given number.- Parameters:
n
- new value for the element traversed accumulator- Since:
- Apr 19, 2011
-
incrementElementsVisited
public void incrementElementsVisited()Increments the number of element traversed by 1.- Since:
- Apr 19, 2011
-
copy
Implements the clone operation required by the base classProbeState
.- Specified by:
copy
in classProbeState<DiagnosticProbeState>
- Returns:
- a deep copy of this object.
- Since:
- Jun 26, 2014
- See Also:
-
addPropertiesTo
Description copied from class:ProbeState
Save the state information to aDataAdaptor
interface.- Overrides:
addPropertiesTo
in classProbeState<DiagnosticProbeState>
- Parameters:
container
- data sink withDataAdaptor
interface- Since:
- Jun 27, 2014
- See Also:
-
readPropertiesFrom
Description copied from class:ProbeState
Recover the state information from aDataAdaptor
interface.- Overrides:
readPropertiesFrom
in classProbeState<DiagnosticProbeState>
- Parameters:
container
- data source withDataAdaptor
interface- Throws:
DataFormatException
- data source is malformatted- Since:
- Jun 27, 2014
- See Also:
-
toString
Returns a representation of the internal state as a string.- Overrides:
toString
in classProbeState<DiagnosticProbeState>
- Returns:
- string containing current
ProbeState
state - Since:
- Jun 27, 2014
- See Also:
-