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_LABELFields inherited from interface xal.model.probe.traj.IProbeState
LIGHT_SPEED -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newDiagnosticProbeState.Creates a newDiagnosticProbeStatewith the state initialized from the givenDiagnosticProbe.DiagnosticProbeState(DiagnosticProbeState diagnosticProbeState) Copy constructor for DiagnosticProbeState. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPropertiesTo(DataAdaptor container) Save the state information to aDataAdaptorinterface.copy()Implements the clone operation required by the base classProbeState.intReturns the number of elements traversed by probe at this state.voidIncrements the number of element traversed by 1.protected voidreadPropertiesFrom(DataAdaptor container) Recover the state information from aDataAdaptorinterface.voidsetElementsVisited(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 newDisagnosticProbeStateobjects with the state attributes of the givenDiagnosticProbeState.- Parameters:
diagnosticProbeState- initializing state- Since:
- Jun 26, 2014
-
DiagnosticProbeState
Creates a newDiagnosticProbeStatewith 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:
copyin classProbeState<DiagnosticProbeState>- Returns:
- a deep copy of this object.
- Since:
- Jun 26, 2014
- See Also:
-
addPropertiesTo
Description copied from class:ProbeStateSave the state information to aDataAdaptorinterface.- Overrides:
addPropertiesToin classProbeState<DiagnosticProbeState>- Parameters:
container- data sink withDataAdaptorinterface- Since:
- Jun 27, 2014
- See Also:
-
readPropertiesFrom
Description copied from class:ProbeStateRecover the state information from aDataAdaptorinterface.- Overrides:
readPropertiesFromin classProbeState<DiagnosticProbeState>- Parameters:
container- data source withDataAdaptorinterface- Throws:
DataFormatException- data source is malformatted- Since:
- Jun 27, 2014
- See Also:
-
toString
Returns a representation of the internal state as a string.- Overrides:
toStringin classProbeState<DiagnosticProbeState>- Returns:
- string containing current
ProbeStatestate - Since:
- Jun 27, 2014
- See Also:
-