Package cnuphys.swim
Class Swimming
java.lang.Object
cnuphys.swim.Swimming
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidAdd a trajectory to the mc collectionstatic voidAdd a trajectory to the recon collectionstatic voidaddSwimTrajectoryListener(SwimTrajectoryListener SwimTrajectoryListener) Add a magnetic field change listenerstatic voidClear all trajectoriesstatic voidClear all the aux trajectories.static voidClear all the mc trajectories.static voidClear all the recon trajectories.static ArrayList<SwimTrajectory>Get all the cached aux trajectoriesstatic ArrayList<SwimTrajectory>Get all the cached mc trajectoriesstatic ArrayList<SwimTrajectory>Get all the cached recon trajectoriesstatic voidstatic voidstatic voidprintSummary(String message, int nstep, double momentum, double[] y, double[] hdata) static voidRemove a trajectory from the aux collectionstatic voidRemove a trajectory from the mc collectionstatic voidRemove a trajectory from the recon collectionstatic voidremoveSwimTrajectoryListener(SwimTrajectoryListener SwimTrajectoryListener) Remove a SwimTrajectoryListener.static voidsetNotifyOn(boolean notifyOn) Set whether we notify listeners.static SwimTrajectorytestSwim(int opt) 
- 
Constructor Details- 
Swimmingpublic Swimming()
 
- 
- 
Method Details- 
setNotifyOnpublic static void setNotifyOn(boolean notifyOn) Set whether we notify listeners. Might turn off temporarily to avoid multiple notifications.- Parameters:
- notifyOn- the flag.
 
- 
clearMCTrajectoriespublic static void clearMCTrajectories()Clear all the mc trajectories.
- 
clearReconTrajectoriespublic static void clearReconTrajectories()Clear all the recon trajectories.
- 
clearAuxTrajectoriespublic static void clearAuxTrajectories()Clear all the aux trajectories.
- 
clearAllTrajectoriespublic static void clearAllTrajectories()Clear all trajectories
- 
getMCTrajectoriesGet all the cached mc trajectories- Returns:
- all the cached mc trajectories
 
- 
getReconTrajectoriesGet all the cached recon trajectories- Returns:
- all the cached recon trajectories
 
- 
getAuxTrajectoriesGet all the cached aux trajectories- Returns:
- all the cached aux trajectories
 
- 
addMCTrajectoryAdd a trajectory to the mc collection- Parameters:
- traj- the trajectory to add.
 
- 
addReconTrajectoryAdd a trajectory to the recon collection- Parameters:
- traj- the trajectory to add.
 
- 
removeMCTrajectoryRemove a trajectory from the mc collection- Parameters:
- traj- the trajectory to remove.
 
- 
removeReconTrajectoryRemove a trajectory from the recon collection- Parameters:
- traj- the trajectory to remove.
 
- 
removeAuxTrajectoryRemove a trajectory from the aux collection- Parameters:
- traj- the trajectory to remove.
 
- 
notifyListenerspublic static void notifyListeners()
- 
addSwimTrajectoryListenerAdd a magnetic field change listener- Parameters:
- SwimTrajectoryListener- the listener to add
 
- 
removeSwimTrajectoryListenerRemove a SwimTrajectoryListener.- Parameters:
- SwimTrajectoryListener- the SwimTrajectoryListener to remove.
 
- 
printSummarypublic static void printSummary(String message, int nstep, double momentum, double[] y, double[] hdata) 
- 
testSwim
- 
main
 
-