SICS-477 In the runscan command restrict mode to 'time' and 'monitor' when the detector type is
set to 'bmon'. Also check that detector type is either 'bmon' or 'histmem'. r3592 | ffr | 2012-06-05 08:21:33 +1000 (Tue, 05 Jun 2012) | 4 lines
This commit is contained in:
committed by
Douglas Clowes
parent
192baf1e95
commit
a24df1fc78
@@ -446,9 +446,17 @@ namespace eval scan {
|
||||
::histogram_memory::count_size $preset
|
||||
hmscan clear
|
||||
hmscan add $scanvar $start $step
|
||||
} else {
|
||||
} elseif {$det_type == "bmon"} {
|
||||
set mode [string tolower $mode]
|
||||
switch -glob $mode {
|
||||
"time" { set bms_mode "timer" }
|
||||
"monitor" { set bms_mode "monitor" }
|
||||
default {return -code error "ERROR: mode should be 'time' or 'monitor' not $mode"}
|
||||
}
|
||||
bmonscan clear
|
||||
bmonscan add $scanvar $start $step
|
||||
} else {
|
||||
return -code error "ERROR: detector type should be 'histmem' or 'bmon' not $det_type"
|
||||
}
|
||||
::scan::runscan_cmd -set numpoints $numpoints
|
||||
::scan::runscan_cmd -set scan_variable $scanvar
|
||||
@@ -460,7 +468,7 @@ namespace eval scan {
|
||||
if {$det_type == "histmem"} {
|
||||
hmscan run $numpoints timer 0
|
||||
} else {
|
||||
bmonscan run $numpoints $mode $preset
|
||||
bmonscan run $numpoints $bms_mode $preset
|
||||
}
|
||||
} message ] {
|
||||
set force_scan false
|
||||
|
||||
Reference in New Issue
Block a user