Set randy factor
We fixed this problem by increasing the event buffer size and changed the "randy_factor".
The event buffer size was set to accommodate the expected maximum size for a pedestal run:
nmods = 16
nchannels/mod = 16
nstrips/chan = 128
nsamples/strip = 6
nbytes/word = 4
size = 16 * 16 * 128 * 6 * 4 = 768kB
To be safe, we set this value to 800kB:
#define MAX_EVENT_LENGTH 1024*800 /* Size in Bytes */
The CODA ROC (by default) expects events that are 4MB / 64 = 64kB. 4MB is the total network buffer size, and 64 is the default "randy_factor".
The 4MB size cannot be changed.. so we change the randy_factor to allow for larger events:
randy_factor = 4MB / 800 kB = 5.12 -> 5
To set this value... we used a TCL script (setrf.tcl) loaded when the ROC is executed:
coda_roc_rc3 -type ROC -name ROCNAME -i -f setrf.tcl
Where setrf.tcl:
proc setrf {val} { global env set rocname [info objects] $rocname configure -randy_factor $val set myvar [$rocname cget -randy_factor] puts "setrf -> $myvar" return $myvar } setrf 5
The routine first gets loaded by the ROC, then executed with the
setrf 5
to set the randy_factor to 5. The ROC is run in interactive mode here... so one could also change the factor on the fly with
setrf <value>
at the ROCs TCL shell.