Adding your own titles allows you to control your software at execution time. This is explained in detail in the Programmer's Manual, but a simple example here can illustrate the main points. Suppose, for example 1 above, you want to be able to control the PMT hit cut. Proceed as follows:-
*DO USER 1 -i(-I) #. User titles.
#.
#.
#. Standard Database Header
#.
19750101 0 20380516 223319 #. 1..4
0 0 0 #. 5..7
0 0 0 #. 8..10
19750101 0 20380516 223319 #. 11..14
0 0 #. 15..16
4*0 #. 17..20
10*0 #. 21..30
#.
#. End of Standard Database Header
#.
50 #. PMT hit cut.
This creates a titles bank USER 1 containing a standard (but still to be
defined) database header, and 1 word of user data, currently set to 50.
The -i signals a format description option and (-I) means that all words are
integer.
integer lauser(8),luser,lduser
equivalence (lauser(6),luser), (lauser(7),lduser)
common /user_com/ lauser
This defines a Link Access Block, the most important word of which is LDUSER,
which will point to the word before the first data word in the USER 1 bank.
include 'user_com.inc'
.
.
.
* Request management of USER 1 without memory mapping.
* Specify request level 2 (abort if bank missing)
* Don't declare an SU id.
lauser(8) = 0
call mt_request_titles( 'USER', 1, 2, lauser, 0)
Once this call has been made you can use the LDUSER link.
include 'mt.inc'
include 'user_com.inc'
and replacing:-
if (num_hits .le. 40 ) call ztell( 800 , 1 )
by:-
if (num_hits .le. icons(lduser+1) ) call ztell( 800 , 1 )
The array ICONS (and equivalenced RCONS), which is defined in
mt.inc, holds all
titles banks. LDUSER+1 points to the first data word (i.e. the PMT hit cut).
set bank job 1 word 2 to 10 set bank job 1 word 20 to 'my_event_output.dat' titles user.dat @run
set bank user 1 word 1 to 60before typing @my_run.cmd.