diff --git a/test/sicsstat.tcl b/test/sicsstat.tcl index e48ef1b5..e11cc276 100644 --- a/test/sicsstat.tcl +++ b/test/sicsstat.tcl @@ -209,6 +209,7 @@ tasub r2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 tasub update #----- MultiMotor sa sa recovernampos noeff a3 24 a4 48 +ref clear singlex cell 0 0 0 0 0 0 singlex oldub 0 0 0 0 0 0 0 0 0 singlex ub 0 0 0 0 0 0 0 0 0 @@ -232,6 +233,7 @@ hkl scantolerance 2.500000 ubcalc difftheta 0.300000 ubcalc maxindex 5 ubcalc maxlist 10 +messref clear fmess weak 0 fmess weakthreshold 20 fmess hkllim -10 -10 10 10 10 10 @@ -242,3 +244,5 @@ cone qscale 1 cone center unknown simidx sttlim 0.2 simidx anglim 0.5 +apple preset 10 +apple mode timer diff --git a/test/testini.tcl b/test/testini.tcl index c4020814..e8148d85 100644 --- a/test/testini.tcl +++ b/test/testini.tcl @@ -529,6 +529,7 @@ singlex mode bi set secMotortest 0 if {$secMotortest == 1} { + proc hdbReadOnly {} { error "Parameter is READ ONLY" } @@ -554,3 +555,79 @@ if {$el737sec == 1} { source ../tcl/el737sec.tcl MakeSecEL737 elli psts235:3008 } + +#------------------------------------------------- +proc loadsinqhm {file} { + set f [open $file r] + while {[gets $f line] >= 0} { + append conf $line + } + close $f + return $conf +} +#------------------------------------------------- +proc appleinit {} { + return [loadsinqhm sans.xml] +} +#--------------------------------------------------------------------- +proc formattof {l} { + set count 0 + set delay [expr int([lindex $l 0])] + foreach e $l { + append txt [format " %12d" [expr int($e) - $delay]] + incr count + if {$count >= 5} { + append txt "\n" + set count 0 + } + } + set len [llength $l] + set bin [lindex $l [expr $len - 1]] + set diff [expr [lindex $l 1] - [lindex $l 0]] + set bin [expr $bin + int($diff)] + append txt [format " %12d" [expr int($bin) - $delay]] + append txt "\n" + return [string trimright $txt] +} +#------------------------------------------------------------------ +proc tofappleinit {} { + set dim [string trim [hval /sics/apple/dim]] + set dimlist [split $dim] + set ntime [lindex $dimlist 1] + append conf "\n" + append conf "\n" + append conf "\n" + append conf " \n " + append conf " \n" + append conf "\n" + set bins [string trim [hval /sics/apple/time_binning]] + set binl [split $bins] + set delay [expr int([lindex $binl 0])% 200000] +# mdif write [format "DT %d" $delay] + foreach b $binl { + if { [string length [string trim $b]] > 1} { + lappend binlist [string trim $b] + } + } + set tlen [expr $ntime + 1] + append conf "\n" + append conf [formattof $binlist] "\n" + append conf "\n" + append conf "\n" + return $conf +} +#------------------------------------------------- +set hmhttp 0 +if {$hmhttp == 1} { + source ../tcl/sinqhttp.tcl + MakeHTTPHM apple 1 hm02 appleinit +# MakeHTTPHM apple 1 localhost:8080 appleinit + apple dim 16384 +#---------- for TOF +# MakeHTTPHM apple 2 hm02 tofappleinit tof +# apple dim 16384 10 +# apple genbin 10 20 100 + applesct debug 0 + apple init +}