Example #1
0
  /** Return a list of BPM nodes associated with the list of bpmAgents */
  public static List<BPM> getNodes(final List<BpmAgent> bpmAgents) {
    final int count = bpmAgents.size();
    final List<BPM> bpmNodes = new ArrayList<>(count);

    for (int index = 0; index < count; index++) {
      final BpmAgent bpmAgent = bpmAgents.get(index);
      bpmNodes.add(bpmAgent.getNode());
    }
    return bpmNodes;
  }
Example #2
0
 /**
  * Get the position of the first corrector relative to the start of the specified sequence.
  *
  * @param sequence The sequence relative to which the corrector's position is measured
  * @return the position of this supply's first corrector relative to the sequence in meters
  */
 public double getFirstCorrectorPositionIn(AcceleratorSeq sequence) {
   return sequence.getPosition(_correctors.get(0).getCorrector());
 }
Example #3
0
 /**
  * Determine whether the corrector supply is horizontal or vertical.
  *
  * @return MagnetType.HORIZONTAL for a horizontal corrector and MagnetType.VERTICAL for a vertical
  *     one
  */
 public int getOrientation() {
   return _correctors.get(0).getCorrector().getOrientation();
 }
Example #4
0
 /** Determine if the supply powers vertical correctors */
 public boolean isVertical() {
   return _correctors.get(0).isVertical();
 }
Example #5
0
 /** Determine if the supply powers horizontal correctors */
 public boolean isHorizontal() {
   return _correctors.get(0).isHorizontal();
 }
Example #6
0
 /** Determine if the supply powers a corrector dipole rather than a bend */
 public boolean isCorrectorSupply() {
   return _correctors.get(0).isCorrector();
 }