Package xal.model.probe
Class DiagnosticProbe
Simple diagnostic probe for testing the Lattice framework.
- Version:
- $id:
- Author:
- Craig McChesney
-
Field Summary
Fields inherited from class xal.model.probe.Probe
COMMENT_LABEL, PROBE_LABEL, stateCurrent, TEXT_LABEL, TIME_LABEL, trajHist, TYPE_LABELFields inherited from interface xal.model.IProbe
LIGHT_SPEED, PERMITTIVITY, UNIT_CHARGE -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for DiagnosticProbe. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Creates a deep copy of the probeCreates a new, emptyDiagnosticProbeState.Captures the probe's state in a ProbeState of the appropriate species.Creates a trajectory of the proper type for saving the probe's history.intReturns the number of elements traversed by probe.voidIncrements the number of element traversed by 1.protected DiagnosticProbeStatereadStateFrom(DataAdaptor container) Read the contents of the suppliedDataAdaptorand return an instance of the appropriate Trajectory species.voidsetElementsVisited(int n) Set the element count to the given number.Methods inherited from class xal.model.probe.Probe
applyState, cloneCurrentProbeState, deepCopy, getAlgorithm, getArchive, getBeta, getComment, getCurrentElement, getCurrentElementTypeId, getCurrentHardwareId, getCurrentState, getGamma, getInitialState, getKineticEnergy, getLongitinalPhase, getMomentum, getPosition, getSpeciesCharge, getSpeciesName, getSpeciesRestEnergy, getTime, getTimestamp, getTrajectory, initialize, initializeFrom, load, lookupLastStateFor, newProbeInitializedFrom, performPostProcessing, readFrom, reset, save, setAlgorithm, setComment, setCurrentElement, setCurrentElementTypeId, setCurrentHardwareId, setKineticEnergy, setLongitudinalPhase, setPosition, setSpeciesCharge, setSpeciesName, setSpeciesRestEnergy, setTime, setTimestamp, setTracking, update
-
Constructor Details
-
DiagnosticProbe
public DiagnosticProbe()Default constructor for DiagnosticProbe. Creates a new (empty) instance of DiagnosticProbe. -
DiagnosticProbe
-
-
Method Details
-
copy
Description copied from class:ProbeCreates a deep copy of the probe- Specified by:
copyin classProbe<DiagnosticProbeState>
-
getElementsVisited
public int getElementsVisited()Returns the number of elements traversed by probe.- 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
-
createTrajectory
Creates a trajectory of the proper type for saving the probe's history.- Specified by:
createTrajectoryin classProbe<DiagnosticProbeState>- Returns:
- a new, empty
Trajectory<DiagnosticProbeState>for saving the probe's history.
-
createProbeState
Description copied from class:ProbeCaptures the probe's state in a ProbeState of the appropriate species.- Specified by:
createProbeStatein classProbe<DiagnosticProbeState>
-
createEmptyProbeState
Creates a new, emptyDiagnosticProbeState.- Specified by:
createEmptyProbeStatein classProbe<DiagnosticProbeState>- Returns:
- a new, empty
DiagnosticProbeState - Since:
- Jul 1, 2014
-
readStateFrom
Description copied from class:ProbeRead the contents of the suppliedDataAdaptorand return an instance of the appropriate Trajectory species.- Specified by:
readStateFromin classProbe<DiagnosticProbeState>- Parameters:
container-DataAdaptorto read a Trajectory from- Returns:
- a ProbeState for the contents of the DataAdaptor
- Throws:
DataFormatException- error encountered reading the DataAdaptor
-