Class TrajectoryDataImpl
- java.lang.Object
-
- cern.accsoft.steering.aloha.meas.data.AbstractDynamicData
-
- cern.accsoft.steering.aloha.plugin.traj.meas.data.TrajectoryDataImpl
-
- All Implemented Interfaces:
BeanAware,MachineElementsManagerAware,Data,DynamicData,TrajectoryData
public class TrajectoryDataImpl extends AbstractDynamicData implements TrajectoryData
-
-
Constructor Summary
Constructors Constructor Description TrajectoryDataImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.String monitorKey, double pos, double noise, boolean valid)adds the noise - value to the dataprotected voidcalc()This method must be implemented by subclasses to calc new values which then can be retrieved.doublegetAverageRms()doublegetAverageRms(java.util.List<Monitor> monitors)doublegetMeanValue(Monitor monitor)the mean position value for the given monitorjava.util.List<java.lang.Double>getMeanValues()get all the position mean values for the active monitorsjava.util.List<java.lang.Double>getMeanValues(Plane plane)all the mean values for monitors of the given planedoublegetRmsValue(Monitor monitor)java.util.List<java.lang.Double>getRmsValues()get the noise-values for the active monitorsjava.util.List<java.lang.Double>getRmsValues(Plane plane)the monitor rms-values for the given planejava.util.List<java.lang.Boolean>getValidityValues()java.util.List<java.lang.Boolean>getValidityValues(Plane plane)-
Methods inherited from class cern.accsoft.steering.aloha.meas.data.AbstractDynamicData
addListener, ensureUpToDate, getActiveCorrectors, getActiveMonitors, getMachineElementsManager, isDirty, removeListener, setDirty, setMachineElementsManager
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cern.accsoft.steering.aloha.meas.data.DynamicData
addListener, removeListener
-
-
-
-
Method Detail
-
calc
protected void calc() throws InconsistentDataExceptionDescription copied from class:AbstractDynamicDataThis method must be implemented by subclasses to calc new values which then can be retrieved.- Specified by:
calcin classAbstractDynamicData- Throws:
InconsistentDataException
-
add
public void add(java.lang.String monitorKey, double pos, double noise, boolean valid)adds the noise - value to the data- Parameters:
monitorKey- the key of the monitor, which this noise-value refers tonoise- the noise-valuevalid- true, if it is a correctly calculated value, false otherwise
-
getAverageRms
public double getAverageRms(java.util.List<Monitor> monitors)
- Parameters:
monitors- the monitors for which to calculate the rms- Returns:
- the average rms over the given monitors
-
getAverageRms
public double getAverageRms()
- Specified by:
getAverageRmsin interfaceTrajectoryData- Returns:
- the average noise over all the active monitors
-
getMeanValue
public double getMeanValue(Monitor monitor)
Description copied from interface:TrajectoryDatathe mean position value for the given monitor- Specified by:
getMeanValuein interfaceTrajectoryData- Parameters:
monitor- the monitor for which to retrieve the value- Returns:
- the mean position value
-
getRmsValue
public double getRmsValue(Monitor monitor)
- Specified by:
getRmsValuein interfaceTrajectoryData- Parameters:
monitor- the monitor for which to return the noise- Returns:
- the noise for the given monitor
-
getRmsValues
public java.util.List<java.lang.Double> getRmsValues()
Description copied from interface:TrajectoryDataget the noise-values for the active monitors- Specified by:
getRmsValuesin interfaceTrajectoryData- Returns:
- all nois-values for the active monitors
-
getMeanValues
public java.util.List<java.lang.Double> getMeanValues()
Description copied from interface:TrajectoryDataget all the position mean values for the active monitors- Specified by:
getMeanValuesin interfaceTrajectoryData- Returns:
- the position values
-
getValidityValues
public java.util.List<java.lang.Boolean> getValidityValues()
- Specified by:
getValidityValuesin interfaceTrajectoryData- Returns:
- a list of booleans, indicating if the data for the given monitor is valid, or not.
-
getMeanValues
public java.util.List<java.lang.Double> getMeanValues(Plane plane)
Description copied from interface:TrajectoryDataall the mean values for monitors of the given plane- Specified by:
getMeanValuesin interfaceTrajectoryData- Parameters:
plane- the plane for which to get the mean values- Returns:
- the mean values
-
getRmsValues
public java.util.List<java.lang.Double> getRmsValues(Plane plane)
Description copied from interface:TrajectoryDatathe monitor rms-values for the given plane- Specified by:
getRmsValuesin interfaceTrajectoryData- Parameters:
plane- the plane for which to retrieve the rms-values- Returns:
- the rms values
-
getValidityValues
public java.util.List<java.lang.Boolean> getValidityValues(Plane plane)
- Specified by:
getValidityValuesin interfaceTrajectoryData- Returns:
- the validity values for all active monitors in the given plane
-
-