set ChannelFile  AnnotatedChannels.txt



#
#   Parse the channel file and create runvars as needed.
#
proc SetupChannels {} {
    global ChannelFile
    set f [open $ChannelFile r]
    set file [read -nonewline $f];       # Suck in the whole file.
    close $f
    set lines [split $file "\n"];       # Make a list of lines
    foreach line $lines {
       set line [split $line " \t"]
        set channel [lindex $line 0];     # Channel or comment...
	if {($channel != "") && ([string index $channel 0] != "\#")} {
	    puts "Creating run variables for $channel"
	    runvar EPICS_DATA($channel)
	    runvar EPICS_UNITS($channel)
	    runvar EPICS_UPDATED($channel)
	}
    }
}

 SetupChannels;               # Process channel definition file

