Filters will often have a very simple function such as applying an
cut or testing some other single word in the data structure. In
such cases, it is probably more convenient to define the test with a
few lines in a SNOMAN command file rather than create a whole new FLTR
bank in a titles file. For this purpose, a set of symbolic commands
are provided which can fill out ``scratch pad'' FLTRs (1-10) already
set up in the file FILTER.DAT with standard headers. FLTRs 11..99 are also
reserved for the same purpose, but the user will have to add them to FILTER.DAT
if required. For example, a
test for (
) would be set up with:-
$enable_test 3 $define_test 3 $line_1 'nhits float_equals EV+$KEV_NPM:50 150;'Translation:
set bank fltr 3 word 4 to 1 set bank fltr 3 word 12 to 'nhits float_equals EV+$KEV_NPM:50 150;'
$enable_test
command just sets the enable flag in the relevant FLTR
bank. The first argument of the $define_test
command is a FLTR bank
number in the range 1-99. The second argument indicates one of 10 lines in the
definition ($line_1
.. $line_10
). The final quoted string is a
line from the filter definition and may consist of up to 80 characters (a
maximum of 20 data words can be handled by a SET BANK command). A command can
be split over two or more lines, for example:-$define_test 3 $line_1 'nhits float_equals ' $define_test 3 $line_2 'EV+$KEV_NPM:50 150;'allowing the 80 character limit to be exceeded.
The type of data structure scanning can be changed with:-
$define_test 1 $no_scan $define_test 1 $and_scan $define_test 1 $or_scan