diff --git a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl index 2527de44..f273ffcd 100644 --- a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl +++ b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl @@ -1,5 +1,5 @@ -# $Revision: 1.5 $ -# $Date: 2007-03-30 07:51:35 $ +# $Revision: 1.6 $ +# $Date: 2007-03-31 01:27:52 $ # Author: Mark Lesha (mle@ansto.gov.au) # Last revision by: $Author: ffr $ @@ -7,11 +7,7 @@ # System: Histogram Server (sample) #------------------------------------------------------------------------ -MakeHM hmm anstohttp -hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080 -hmm configure username spy -hmm configure password 007 -hmm configure hmDataPath ../HMData +#ffr MakeHM hmm anstohttp, move to inst specific config namespace eval histogram_memory { VarMake hmm_dim0 Int User @@ -68,6 +64,11 @@ hmm configure hmconfigscript "returnconfigfile $cfPath(hmm)/anstohm_full.xml" # # Making sure the histogram server is stopped, so we can load configuration. proc hmm_initialize {} { +hmm configure hmaddress http://das1-[SplitReply [instrument]]:8080 +hmm configure username spy +hmm configure password 007 +hmm configure hmDataPath ../HMData + hmm configure init 0 hmm init hmm stop @@ -126,7 +127,7 @@ proc hmm_setup {mode bankNum rankNum nyc nxc ntc} { # instead of just stopping it, so we can generate multiple datasets # during a scan, or overlap data acquired at different scan stations. # It can also terminate either on the counter or any of the histogram objects. -MakeHMControl_ANSTO hmc bm hmm +#ffr MakeHMControl_ANSTO hmc bm hmm, move to inst specific config ############################################## # Creating scans and creating/attaching diff --git a/site_ansto/instrument/hipd/script_validator/config/hmm/hmm_configuration.tcl b/site_ansto/instrument/hipd/script_validator/config/hmm/hmm_configuration.tcl index 5df63c3e..f5d3fe1f 100644 --- a/site_ansto/instrument/hipd/script_validator/config/hmm/hmm_configuration.tcl +++ b/site_ansto/instrument/hipd/script_validator/config/hmm/hmm_configuration.tcl @@ -1,32 +1,22 @@ MakeHM hmm SIM -hmm configure HistMode Normal -hmm configure OverFlowMode Ceil -hmm configure dim0 512 -hmm configure dim1 [expr 480 * 8 - 1] -hmm configure rank 2 -hmm configure BinWidth 4 -#hmm configure BinWidth 1 -hmm preset 100. -hmm CountMode Timer -hmm configure Counter counter -hmm configure init 0 -hmm init +#MakeHMControl_ANSTO hmc bm hmm +source $cfPath(hmm)/hmm_configuration_common_1.tcl -#MakeScanCommand hmscan bm scan.hdd recover.bin - -namespace eval histogram_memory { -proc prepare {} {} -proc finish {} {} -proc count_bm_controlled {mode preset} { - hmm countmode $mode - hmm preset $preset +proc ::histogram_memory::hmc {_start _preset _mode _pause} { + hmm countmode $_mode + hmm preset $_preset hmm countblock } -proc hmm_initialize {} {} -proc hmm_setup {mode bankNum rankNum nyc nxc ntc} {} + +proc ::histogram_memory::hmmdictitemval {histomem dictitem} { + array set dict [list stitch_nyc 512 stitch_nxc [expr 480 * 8 - 1] oat_ntc_eff 1 ] + return $dict($dictitem); } -publish ::histogram_memory::prepare user -publish ::histogram_memory::finish user -publish ::histogram_memory::count_bm_controlled user +proc ::histogram_memory::hmm_initialize {} { +} + +::histogram_memory::hmm_initialize +::histogram_memory::hmm_setup transparent 7000000 3 stitch_nyc stitch_nxc oat_ntc_eff +hmm_start 0 diff --git a/site_ansto/instrument/hrpd/script_validator/config/hmm/hmm_configuration.tcl b/site_ansto/instrument/hrpd/script_validator/config/hmm/hmm_configuration.tcl index 59876ce8..0fc9e008 100644 --- a/site_ansto/instrument/hrpd/script_validator/config/hmm/hmm_configuration.tcl +++ b/site_ansto/instrument/hrpd/script_validator/config/hmm/hmm_configuration.tcl @@ -1,44 +1,22 @@ -VarMake hmm_dim0 Int User -VarMake hmm_dim1 Int User -VarMake hmm_dim2 Int User -VarMake hmm_histmode Text User -VarMake hmm_bank Int User -VarMake hmm_rank Int User -VarMake hmm_start Int User -VarMake hmm_length Int User - -hmm_dim0 512 -hmm_dim1 128 MakeHM hmm SIM -hmm configure HistMode Normal -hmm configure OverFlowMode Ceil -hmm configure dim0 512 -hmm configure dim1 128 -hmm configure rank 2 -hmm configure BinWidth 4 -#hmm configure BinWidth 1 -hmm preset 100. -hmm CountMode Timer -hmm configure Counter counter -hmm configure init 0 -hmm init +#MakeHMControl_ANSTO hmc bm hmm +source $cfPath(hmm)/hmm_configuration_common_1.tcl -hmm_length [expr {[SplitReply [hmm_dim0]] * [SplitReply [hmm_dim1]]} ] -#MakeScanCommand hmscan bm scan.hdd recover.bin - -namespace eval histogram_memory { -proc prepare {} {} -proc finish {} {} -proc count_bm_controlled {mode preset} { - hmm countmode $mode - hmm preset $preset +proc ::histogram_memory::hmc {_start _preset _mode _pause} { + hmm countmode $_mode + hmm preset $_preset hmm countblock } -proc hmm_initialize {} {} -proc hmm_setup {mode bankNum rankNum nyc nxc ntc} {} + +proc ::histogram_memory::hmmdictitemval {histomem dictitem} { + array set dict [list oat_nyc_eff 512 oat_nxc_eff 128 oat_ntc_eff 1 ] + return $dict($dictitem); } -publish ::histogram_memory::prepare user -publish ::histogram_memory::finish user -publish ::histogram_memory::count_bm_controlled user +proc ::histogram_memory::hmm_initialize {} { +} + +::histogram_memory::hmm_initialize +::histogram_memory::hmm_setup transparent 0 3 oat_nyc_eff oat_nxc_eff oat_ntc_eff +hmm_start 0