Class AbstractDynamicData
- java.lang.Object
-
- cern.accsoft.steering.aloha.meas.data.AbstractDynamicData
-
- All Implemented Interfaces:
BeanAware,MachineElementsManagerAware,Data,DynamicData
- Direct Known Subclasses:
CombinedTrajectoryDataImpl,DispersionDataImpl,JMadModelOpticsData,KickResponseDataImpl,ModelKickResponseDataImpl,MultiturnDataImpl,TrajectoryDataImpl
public abstract class AbstractDynamicData extends java.lang.Object implements DynamicData, MachineElementsManagerAware
this class is the superclass for all Data-classes, which need to be aware of the actually selected correctors/monitors in order to (for example) produce matrices or vectors in the correct dimensions.
-
-
Constructor Summary
Constructors Constructor Description AbstractDynamicData()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddListener(DynamicDataListener listener)protected abstract voidcalc()This method must be implemented by subclasses to calc new values which then can be retrieved.protected voidensureUpToDate()ensures, that the lists are up to dateprotected java.util.List<Corrector>getActiveCorrectors()protected java.util.List<Monitor>getActiveMonitors()protected MachineElementsManagergetMachineElementsManager()protected booleanisDirty()voidremoveListener(DynamicDataListener listener)protected voidsetDirty(boolean dirty)sets the dirty-flag to the given value.voidsetMachineElementsManager(MachineElementsManager machineElementsManager)by the use of this method theMachineElementsManageris injected if the class is configured by theAlohaBeanFactory
-
-
-
Method Detail
-
isDirty
protected final boolean isDirty()
- Returns:
- true, if the actual response-matrix is not corresponding to the actual selected monitors/corrector, false otherwise.
-
setDirty
protected final void setDirty(boolean dirty)
sets the dirty-flag to the given value.- Parameters:
dirty- the new value for the dirty-flag
-
ensureUpToDate
protected final void ensureUpToDate()
ensures, that the lists are up to dateThis method should be called before any value, which needs calculation is returned
-
calc
protected abstract void calc() throws InconsistentDataExceptionThis method must be implemented by subclasses to calc new values which then can be retrieved.- Throws:
InconsistentDataException
-
getActiveCorrectors
protected final java.util.List<Corrector> getActiveCorrectors()
- Returns:
- the active correctors
-
getActiveMonitors
protected final java.util.List<Monitor> getActiveMonitors()
- Returns:
- the active Monitors
-
setMachineElementsManager
public final void setMachineElementsManager(MachineElementsManager machineElementsManager)
Description copied from interface:MachineElementsManagerAwareby the use of this method theMachineElementsManageris injected if the class is configured by theAlohaBeanFactory- Specified by:
setMachineElementsManagerin interfaceMachineElementsManagerAware- Parameters:
machineElementsManager- the machineElementsManager to set
-
getMachineElementsManager
protected final MachineElementsManager getMachineElementsManager()
- Returns:
- the machineElementsManager
-
addListener
public final void addListener(DynamicDataListener listener)
- Specified by:
addListenerin interfaceDynamicData- Parameters:
listener- the listener to add
-
removeListener
public final void removeListener(DynamicDataListener listener)
- Specified by:
removeListenerin interfaceDynamicData- Parameters:
listener- the listener to remove
-
-