forked from bmoffit/coda_scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setrf.tcl
executable file
·48 lines (39 loc) · 1.04 KB
/
setrf.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# TCL command to set randy_factor (max events per output buffer)
# in the coda_roc
#
# You must include the following arguments
# val - value to set randy_factor to
#
# To include this function in the coda_roc at boot
#
# coda_roc -i -n ROC1 -t ROC -f setrf.tcl
#
proc setrf {val} {
global env
set rocname [info objects]
$rocname configure -randy_factor $val
set myvar [$rocname cget -randy_factor]
puts ""
puts "************** setrf.tcl ***************"
puts "*"
puts "* Max Events per output Buffer = $myvar"
puts "*"
puts "************** setrf.tcl ***************"
puts ""
return $myvar
}
proc getrf {} {
global env
set rocname [info objects]
set myvar [$rocname cget -randy_factor]
puts ""
puts "************** setrf.tcl ***************"
puts "*"
puts "* Max Events per output Buffer = $myvar"
puts "*"
puts "************** setrf.tcl ***************"
puts ""
return $myvar
}
# Set when this script is loaded by the ROC with "-f setrf.tcl"
setrf 1