next up previous contents
Next: FLTR banks and the Up: The Filter Previous: Programmable Tests: The FLTR   Contents

Defining an Programmable Test in a Command File

Filters will often have a very simple function such as applying an $N_{hits}$ 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 ( $50\leq N_{hit}\leq 150$) 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


next up previous contents
Next: FLTR banks and the Up: The Filter Previous: Programmable Tests: The FLTR   Contents
sno Guest Acct 2009-09-09