gov.sns.xal.model
Interface IAlgorithm

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
Tracker

public interface IAlgorithm
extends java.rmi.Remote

The root interface of accelerator algorithms (for example: Mapper, Tracker, and others). According to the Element-Algorithm-Probe analysis pattern, the Algorithm objects describe interactions between accelerator structures (Element's) and physical objects (Probe's).


Method Summary
 IArchive getArchive()
          Return the IArchive interface for archiving this algorithm object.
 java.lang.String getType()
          Returns a string type identifier of algorithm class
 int getVersion()
          Returns the version number of this algorithm
 void initialize()
          Initialize the algorithm for propagation.
 void propagate(IProbe probe, IElement elem)
          Propagates the probe through the element.
 void setStartElementId(java.lang.String id)
          Set the id of the element from which to start propagation.
 void setStopElementId(java.lang.String id)
          Set the id of the element at which to stop propagation.
 void unsetStartElementId()
          reset Start point to the beginning of the sequence
 void unsetStopElementId()
          reset Stop point to the end of the sequence
 boolean useRfGapPhaseCalculation()
          indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)
 boolean validProbe(IProbe probe)
          Check if probe can be handled by this algorithm.
 

Method Detail

getType

public java.lang.String getType()
Returns a string type identifier of algorithm class


getVersion

public int getVersion()
Returns the version number of this algorithm


validProbe

public boolean validProbe(IProbe probe)
Check if probe can be handled by this algorithm.

Parameters:
probe - probe to be tested
Returns:
true if algorithm can propagation probe, false otherwise

setStartElementId

public void setStartElementId(java.lang.String id)
Set the id of the element from which to start propagation.

Parameters:
id - String id of the element from which to start propagation

unsetStartElementId

public void unsetStartElementId()
reset Start point to the beginning of the sequence


setStopElementId

public void setStopElementId(java.lang.String id)
Set the id of the element at which to stop propagation.

Parameters:
id - String id of the element at which to stop propagation

unsetStopElementId

public void unsetStopElementId()
reset Stop point to the end of the sequence


initialize

public void initialize()
                throws ModelException
Initialize the algorithm for propagation. Reset any necessary state variables

Throws:
ModelException - unable to initialize algorithm

propagate

public void propagate(IProbe probe,
                      IElement elem)
               throws ModelException
Propagates the probe through the element.

Parameters:
probe - target object
elem - beamline element acting on the probe
ModelException

getArchive

public IArchive getArchive()
Return the IArchive interface for archiving this algorithm object.


useRfGapPhaseCalculation

public boolean useRfGapPhaseCalculation()
indicates whether to calculate the beam phase in multi gap Rf cavities, (a la Parmila) rather than use default values (a la Trace 3D)