SICS-664 Remove unnecessary histogram memory controller hmc

This commit is contained in:
Ferdi Franceschini
2013-09-10 21:17:39 +10:00
parent 39497e2810
commit 9758aaee6b

View File

@@ -20,10 +20,8 @@ namespace eval histogram_memory {
variable ic_fsrce_values
variable preset_mult
variable monitor_controlled
variable oscmd_controlled
set monitor_controlled "false"
set oscmd_controlled "false"
# Instrument Specific Config variables
@@ -59,18 +57,8 @@ namespace eval histogram_memory {
hmm configure bm${bm_num}_event_rate 50
}
}
proc hmc {_start _preset _mode _pause pauseval} {
if [ catch {
bm mode $_mode
bm preset $_preset
hmm countblock
} message ] {
return -code error "([info level 0]) $message"
}
}
} else {
ANSTO_MakeHM hmm anstohttp
MakeHMControl_ANSTO hmc bm hmm;
}
@@ -169,15 +157,6 @@ namespace eval histogram_memory {
}
}
# Simulated counter. No error rate. Required for technical reasons...
# The simulated counter is used only to block execution till the bm count is actually reached,
# for the scan example using hmc and bm objects to control the acquisition duration from SICS.
MakeCounter blockctr SIM -1.0
blockctr SetExponent 0
blockctr SetMode timer
blockctr SetPreset 0
##############################################
# Support for using expanded histogram period
# to create interlaced/overlapped histograms
@@ -236,7 +215,6 @@ namespace eval histogram_memory {
proc set_sobj_attributes {} {
if [ catch {
# SICS commands
sicslist setatt blockctr privilege internal;
# histogram memory macros
sicslist setatt ::histogram_memory::set_oat_offset privilege internal;
@@ -1582,7 +1560,6 @@ Publish SAT_TABLE user
proc ::histogram_memory::start {{blocking "noblock"}} {
variable histmem_simulation
variable monitor_controlled
variable oscmd_controlled
if [ catch {
set options [list block noblock]
@@ -1590,22 +1567,18 @@ Publish SAT_TABLE user
error "ERROR: Valid options are $options"
}
::histogram_memory::pre_count
set hm_start {hmm init}
if {$monitor_controlled == "true"} {
set hm_start {hmm count}
} else {
bm setmode timer
bm setpreset 32000000
if {$oscmd_controlled == "true"} {
set hm_start {hmm count}
} else {
set hm_start {hmc start 1000000000 timer pause 1}
}
}
## TODO Test monitor controlled counting
# set hm_start {hmm init}
# if {$monitor_controlled == "true"} {
# set hm_start {hmm count}
# } else {
# bm setmode timer
# bm setpreset 32000000
# }
if {$blocking == "block"} {
eval waitfor hmm $hm_start
hmm countblock
} else {
eval $hm_start
hmm count
}
} message ] {
return -code error "([info level 0]) $message"