- Added test initialisation for the new HM
This commit is contained in:
@ -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
|
||||
|
@ -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 "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
append conf "<sinqhm filler=\"tof\" hdr_daq_mask=\"0x20000000\" "
|
||||
append conf "hdr_daq_active=\"0x00000000\">\n"
|
||||
append conf "<bank rank=\"2\">\n"
|
||||
append conf " <axis length=\"16387\" mapping=\"direct\"/>\n "
|
||||
append conf " <axis length=\"$ntime\" mapping=\"boundary\" array=\"tof\"/>\n"
|
||||
append conf "</bank>\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 "<tof rank=\"1\" dim=\"$tlen\">\n"
|
||||
append conf [formattof $binlist] "\n"
|
||||
append conf "</tof>\n"
|
||||
append conf "</sinqhm>\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
|
||||
}
|
||||
|
Reference in New Issue
Block a user