Example #1
0
  /** Set whether to use the beam event to trigger orbit snapshots */
  public void setUseBeamEventTrigger(final boolean useTrigger) {
    _useBeamEventTrigger = useTrigger;

    synchronized (_orbitSources) {
      for (final OrbitSource orbitSource : _orbitSources) {
        orbitSource.setUseBeamEventTrigger(useTrigger);
      }
    }
  }
Example #2
0
  /** refresh enabled BPMs */
  protected void refreshEnabledBPMs(final boolean postChange) {
    final List<BpmAgent> bpmAgents = new ArrayList<BpmAgent>(AVAILABLE_BPM_AGENTS.size());

    for (final BpmAgent bpmAgent : AVAILABLE_BPM_AGENTS) {
      if (bpmAgent.isEnabled()) {
        bpmAgents.add(bpmAgent);
      }
    }
    _bpmAgents = new ArrayList<BpmAgent>();
    _bpmAgents.addAll(bpmAgents);

    if (postChange) {
      for (final OrbitSource source : _orbitSources) {
        source.setSequence(_sequence, _bpmAgents);
      }
      EVENT_PROXY.enabledBPMsChanged(this, _bpmAgents);
    }
  }
Example #3
0
  /**
   * Add a new OrbitSource to this model's orbit sources.
   *
   * @param orbitSource the new orbit source to add
   */
  public void addOrbitSource(final OrbitSource orbitSource) {
    synchronized (_orbitSources) {
      if (!_orbitSources.contains(orbitSource)) {
        orbitSource.setSequence(_sequence, _bpmAgents);
        _orbitSources.add(orbitSource);
        EVENT_PROXY.orbitSourceAdded(this, orbitSource);
      }
    }

    postModification();
  }
Example #4
0
  /**
   * Set the selected sequence
   *
   * @param sequence the new selected sequence
   */
  public void setSequence(final AcceleratorSeq sequence) {
    _sequence = sequence;

    // clear the probe since a new one will need to be made for the new sequence
    _baseProbe = null;

    loadBPMs();
    loadCorrectors();
    useSetpoints(sequence);

    BEAM_EXCURSION_ORBIT_ADAPTOR.setSequence(sequence);
    BEAM_EXCURSION_ORBIT_ADAPTOR.setBPMAgents(_bpmAgents);

    synchronized (_orbitSources) {
      for (final OrbitSource orbitSource : _orbitSources) {
        orbitSource.setSequence(sequence, _bpmAgents);
      }
    }

    _modificationStore.postModification(this);
    EVENT_PROXY.sequenceChanged(this, sequence);
  }