Exemple #1
0
  // getNodes() could not be cast to a type so the conversion could not be checked
  @SuppressWarnings("unchecked")
  private static boolean sharesMainSupply(final Electromagnet magnet) {
    final Collection<Electromagnet> nodes = magnet.getMainSupply().getNodes();
    final Iterator<Electromagnet> nodeIter = nodes.iterator();

    while (nodeIter.hasNext()) {
      final Electromagnet node = nodeIter.next();
      if (!node.getId().equals(magnet.getId())) {
        return true;
      }
    }

    return false;
  }
Exemple #2
0
 /** Use setpoints for electromagnets. */
 public void useSetpoints(final AcceleratorSeq sequence) {
   if (sequence != null) {
     final List<AcceleratorNode> magnets = sequence.getNodesOfType(Electromagnet.s_strType, true);
     for (AcceleratorNode node : magnets) {
       ((Electromagnet) node).setUseFieldReadback(false);
     }
   }
 }