#!/bin/sh  
# \
  exec oagwish "$0" "$@"

#
# $Log: not supported by cvs2svn $
# Revision 1.2  2003/12/09 18:04:59  shang
# replaced APSBoosterPlaneObritConfig by APSBoosterPlaneOrbitConfig
#
# Revision 1.1  2002/10/04 00:29:24  shang
# first version of booster orbit correction configuration
#
# first version, Hairong Shang


set auto_path [linsert $auto_path 0 /usr/local/oag/apps/lib/$env(HOST_ARCH)]
set auto_path [linsert $auto_path 0 /usr/local/oag/lib_patch/$env(HOST_ARCH)]
set auto_path [linsert $auto_path 0 /home/oxygen/SHANG/oag/apps/src/tcltklib]
APSDebugPath

wm geometry . +10+10

set args $argv
set tabList {"Horizontal" "Vertical"}
set widgetIndex {0 1}

APSApplication . -name BoosterHVOrbitCorrectionConfig -version 1 \
  -overview {This application allows configuration of booster.  You may choose the lattice, which monitors and correctors to use, and restrict your choices to only good components.}


set widgetList [APSTabFrame .tabs -parent .userFrame -width 1200 -height 500 \
                  -labelList [join $tabList] -label ""]


foreach plane {h v} widget $widgetList {
    set bpmItemList {C0P1 C0P2 C1P1 C1P2 C2P1 C2P2 C3P1 C3P2 C4P1 \
                       C4P2 C5P1 C5P2 C6P1 C6P2 C7P1 C7P2 C8P1 C8P2 C9P1 C9P2}
    
    set bpmItemLabelList {0P1 0P2 1P1 1P2 2P1 2P2 3P1 3P2 \
                            4P1 4P2 5P1 5P2 6P1 6P2 7P1 7P2 8P1 8P2 9P1 9P2}
    switch $plane {
        h {
            set corrItemList H
        }
        v {
            set corrItemList V
        }
    }
    APSBoosterPlaneOrbitConfig .booster -parent $widget -plane $plane -bpm 1 \
      -corrector 1 -bpmItemList $bpmItemList \
      -bpmItemLabelList $bpmItemLabelList -bpmCorrTogether 1 \
      -corrItemList $corrItemList -bpmCorrTogether 1 \
      -rootname ${plane}Booster -parent $widget -fileFrame 1
}

