Interface MachineElementsManager

  • All Superinterfaces:
    Data
    All Known Implementing Classes:
    MachineElementsManagerImpl

    public interface MachineElementsManager
    extends Data
    this is the interface for a class, that keeps track of the active elements (correctors and monitors)
    • Method Detail

      • convertToActiveMonitorIndex

        java.lang.Integer convertToActiveMonitorIndex​(int allMonitorIndex)
        converts an index in the all-monitor list to an index which is valid in the active monitors list. if the monitor of the given index is not active, then it returns null.
        Parameters:
        allMonitorIndex - the index in the all-monitors list
        Returns:
        the index related to active monitors if the corrector is a
      • getAllMonitors

        java.util.List<Monitor> getAllMonitors()
        Returns:
        all available Monitors
      • getActiveMonitors

        java.util.List<Monitor> getActiveMonitors()
        collects all working monitors and returns an ArrayList.
        Returns:
        the functional monitors.
      • getActiveMonitorGains

        java.util.List<java.lang.Double> getActiveMonitorGains()
        Returns:
        the gains of the active monitors
      • getActiveMonitorGainErrors

        java.util.List<java.lang.Double> getActiveMonitorGainErrors()
        Returns:
        the errors on the gains of the active monitors
      • getActiveMonitorNames

        java.util.List<java.lang.String> getActiveMonitorNames()
        Returns:
        the names of all active monitors
      • getActiveMonitorNames

        java.util.List<java.lang.String> getActiveMonitorNames​(Plane plane)
        Parameters:
        plane - the plane for which to return the active monitor names
        Returns:
        the active monitor names for that plane
      • getActiveMonitorsCount

        int getActiveMonitorsCount()
        counts the monitors which have an OK status.
        Returns:
        the number of monitors with status OK.
      • getActiveMonitorsCount

        int getActiveMonitorsCount​(Plane plane)
        Parameters:
        plane - the plane for which to retrieve the count
        Returns:
        the amount of active monitors in the given plane
      • getActiveMonitorSelection

        MonitorSelection getActiveMonitorSelection()
        determines, which monitors are actually selected and returns the keys in an object.
        Returns:
        The object containing all the selected keys.
      • apply

        void apply​(MonitorSelection monitorSelection)
        activates all monitors, whose key is contained in the MonitorSelection object. All other monitors will be deselected.
        Parameters:
        monitorSelection - the object from which to take the active keys.
      • convertToActiveCorrectorIndex

        java.lang.Integer convertToActiveCorrectorIndex​(int allCorrectorIndex)
        converts an index in the all-correcors list to an index which is valid in the active correctors list. if the corrector of the given index is not active, then it returns null.
        Parameters:
        allCorrectorIndex - the index in the all-correctors list
        Returns:
        the index related to active correctors if the corrector is a
      • getAllCorrectors

        java.util.List<Corrector> getAllCorrectors()
        Returns:
        all available Correctors
      • getActiveCorrectors

        java.util.List<Corrector> getActiveCorrectors()
        Collects all active correctors in an ArrayList.
        Returns:
        the active Correctors
      • getActiveCorrectorsCount

        int getActiveCorrectorsCount()
        determines the number of correctors which were activated during the measurement. (= number of StearingFiles)
        Returns:
      • getActiveCorrectorsCount

        int getActiveCorrectorsCount​(Plane plane)
        Parameters:
        plane - the plane for which to retrieve the count
        Returns:
        the amount of active correctors in the given plane
      • getActiveCorrectorNames

        java.util.List<java.lang.String> getActiveCorrectorNames()
        Returns:
        the names of all active correctors
      • getActiveCorrectorGains

        java.util.List<java.lang.Double> getActiveCorrectorGains()
        Returns:
        the gains of the active correctors
      • getActiveCorrectorGainErrors

        java.util.List<java.lang.Double> getActiveCorrectorGainErrors()
        Returns:
        the errors of the gains of the active correctors
      • getActiveCorrectorNames

        java.util.List<java.lang.String> getActiveCorrectorNames​(Plane plane)
        Parameters:
        plane - the plane for which to get the monitor names
        Returns:
        the names of the active monitors for the given plane
      • isFilled

        boolean isFilled()
        Returns:
        true, if the manager already has its correctors, false, if not.
      • fill

        void fill​(cern.accsoft.steering.jmad.model.JMadModel model,
                  JMadModelAdapter jMadModelAdapter)
        fills the lists with the initial values from the model
        Parameters:
        model - the JMadModel to use for filling the lists
      • clear

        void clear()
        removes all the element-entries.
      • getActiveCorrectorNumber

        int getActiveCorrectorNumber()
        Returns:
        the actual displayed Corrector - number (out of the active Correctors)
      • getActiveMonitorNumber

        int getActiveMonitorNumber()
        Returns:
        the actual displayed monitor - number
      • setActiveCorrectorNumber

        void setActiveCorrectorNumber​(int activeCorrectorNumber)
        set the actually displayed corrector-number
        Parameters:
        activeCorrectorNumber -
      • setActiveMonitorNumber

        void setActiveMonitorNumber​(int activeMonitorNumber)
        set the actually displayed monitor-number
        Parameters:
        activeMonitorNumber -
      • getMonitorHVBorderProvider

        cern.accsoft.steering.jmad.gui.mark.MarkerXProvider getMonitorHVBorderProvider()
        Returns:
        a provider for aloha-charts, which indicates the border between x and y monitors
      • getCorrectorHVBorderProvider

        cern.accsoft.steering.jmad.gui.mark.MarkerXProvider getCorrectorHVBorderProvider()
        Returns:
        a provider for aloha-charts, which indicates the border between x and y correctors
      • setSuppressActiveElementsChangedEvent

        void setSuppressActiveElementsChangedEvent​(boolean suppressActiveElementsChangedEvent)
        if this property is set to true, then no listener is notified, that one of the elements changed its state. This is useful, if a group of states is changed at once. When the value is set back to false, then one event is sent to all listeners.
        Parameters:
        suppressActiveElementsChangedEvent -
      • activateAvailableMonitors

        <T extends DataValue> void activateAvailableMonitors​(java.util.Collection<? extends MeasuredData<T>> readingDatas)
        sets the status of the monitors correctly and deactivates the monitors, which are not available in at least one dataset.
        Parameters:
        readingDatas - the data read from files
      • getActiveMonitors

        java.util.List<Monitor> getActiveMonitors​(Plane plane)
        Parameters:
        plane -
        Returns:
        the active monitors for the given plane
      • getActiveCorrectors

        java.util.List<Corrector> getActiveCorrectors​(Plane plane)
        Parameters:
        plane -
        Returns:
        the active correctors for the given plane
      • resetAllGains

        void resetAllGains()
        resets the gains of all monitors and correctors to their initial value.
      • setSuppressChangedCorrectorGainsEvent

        void setSuppressChangedCorrectorGainsEvent​(boolean suppressChangedCorrectorGainsEvent)
      • setSuppressChangedMonitorGainsEvent

        void setSuppressChangedMonitorGainsEvent​(boolean suppressChangedMonitorGainsEvent)