|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.xal.model.probe.traj.ProbeState
Stores a snapshot of a probes state at a particular instant in time. Concrete extensions to this class should be developed for each type of probe.
| Field Summary | |
static java.lang.String |
STATE_LABEL
element tag for the probe state data |
| Constructor Summary | |
ProbeState()
Default constructor - creates an empty ProbeState object. |
|
ProbeState(Probe probe)
Initializing Constructor. |
|
| Method Summary | |
protected void |
addPropertiesTo(DataAdaptor container)
Save the state information to a DataAdaptor interface. |
java.lang.String |
getElementId()
Returns the id of the lattice element associated with this state. |
double |
getKineticEnergy()
Return the kinetic energy of the probe. |
double |
getPosition()
Returns the current beam-line position of the probe |
double |
getSpeciesCharge()
Returns the charge of probe's particle species |
double |
getSpeciesRestEnergy()
Returns the rest energy of particle species |
double |
getTime()
Return the time elapsed from the start of the probe tracking |
void |
load(DataAdaptor container)
Recovers the state information from a data source represented by a DataAdaptor interface. |
static ProbeState |
readFrom(DataAdaptor container)
Read the contents of the supplied DataAdaptor and return
an instance of the appropriate Trajectory species. |
protected void |
readPropertiesFrom(DataAdaptor container)
Recover the state information from a DataAdaptor interface. |
void |
save(DataAdaptor container)
Save the state information to a data sink represented by a DataAdaptor interface |
void |
setElementId(java.lang.String id)
Set the lattice element id associated with this state. |
void |
setKineticEnergy(double W)
Set the current kinetic energy of the probe. |
void |
setPosition(double s)
Set the current position of the probe along the beamline. |
void |
setSpeciesCharge(double q)
Set the charge of the particle species in the beam |
void |
setSpeciesRestEnergy(double Er)
Set the rest energy of a single particle in the beam |
void |
setTime(double dblTime)
Set the current probe time elapsed from the start of the probe tracking. |
java.lang.String |
toString()
Return a textual representation of the ProbeState internal state. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String STATE_LABEL
| Constructor Detail |
public ProbeState()
ProbeState object.
public ProbeState(Probe probe)
ProbeState object initialized
to the state of the Probe argument.
probe - Probe object containing initial values| Method Detail |
public static ProbeState readFrom(DataAdaptor container)
throws ParsingException
DataAdaptor and return
an instance of the appropriate Trajectory species.
container - DataAdaptor to read a Trajectory from
ParsingException - error encountered reading the DataAdaptorpublic void setSpeciesCharge(double q)
q - species particle charge (Coulombs)public void setSpeciesRestEnergy(double Er)
Er - particle rest energy (electron-volts)public void setPosition(double s)
s - new probe position (meters)getPositionpublic void setTime(double dblTime)
dblTime - elapsed time in secondspublic void setKineticEnergy(double W)
W - new probe kinetic energy (electron-volts)getKineticEnergypublic void setElementId(java.lang.String id)
id - element id of current lattice elementpublic double getSpeciesCharge()
public double getSpeciesRestEnergy()
public java.lang.String getElementId()
public double getPosition()
public double getTime()
public double getKineticEnergy()
public java.lang.String toString()
ProbeState internal state.
toString in class java.lang.ObjectProbeState statepublic void save(DataAdaptor container)
DataAdaptor interface
save in interface IArchivecontainer - data source to receive state information
public void load(DataAdaptor container)
throws DataFormatException
DataAdaptor interface.
load in interface IArchivecontainer - data source containing state information
DataFormatException - data in container is malformatedprotected void addPropertiesTo(DataAdaptor container)
DataAdaptor interface.
container - data sink with DataAdaptor interface
protected void readPropertiesFrom(DataAdaptor container)
throws ParsingException
DataAdaptor interface.
container - data source with DataAdaptor interface
ParsingException - data source is malformatted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||