java.lang.Object
simpa.core.api.track.BeamTrajectoryObserver
- All Implemented Interfaces:
TrackingObserver
-
Nested Class Summary
Nested classes/interfaces inherited from interface simpa.core.api.track.TrackingObserver
TrackingObserver.ObserverBehaviour
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Finishes the tracking of the given particle.void
Observe the particle using this observer.void
writeToFile
(String fileName) Write the trajectory of the particles in a beam hitting this observer to a file.
-
Constructor Details
-
BeamTrajectoryObserver
-
-
Method Details
-
getBehaviour
-
observe
Description copied from interface:TrackingObserver
Observe the particle using this observer.- Specified by:
observe
in interfaceTrackingObserver
- Parameters:
p
- - Particle to observe
-
finish
Description copied from interface:TrackingObserver
Finishes the tracking of the given particle.- Specified by:
finish
in interfaceTrackingObserver
- Parameters:
p
- the particle to stop tracking
-
getTrajectoryData
- Returns:
- A map containing trajectory for each particle in the beam. The key is the particle name.
-
writeToFile
Write the trajectory of the particles in a beam hitting this observer to a file. Should be called after the beam tracking is finished. If the observer was created with the ObserverBehaviour.STORE_ONLY option the method returns without writing the file.- Parameters:
fileName
- The file to write to.
-