Push the button labeled Control on the main D0X menu bar. You should see the following:
Items in this menu allow you to:
Read in records one at a time. Note that the front-panel button labelled Next Event will do the same thing without the need to pull down the control menu every time.
Read in all records sequentially until end-of-file is reached. This is useful for event stipping or histogramming (see Histogram/Query Editor and Output File).
This option allows you to skip through a number of records (events). For instance, you might want to go to the 5th event. You select this option and you will be prompted for the number of records to skip.
Halt automatic reading in of sequential events.
You can ask D0X to fetch the event which is specified by one of the following. In each case you will be prompted for the relevant criteria:
Hit this button and the following menu should appear:

These are the packages which are already linked in. You can turn them on/off via the toggle buttons (little diamond buttons). Note that the initialization entries (from the appropriate PBD file) are called automatically). The order is as appears in the menu. Remember, you have to have RCP files defined for these packages to work, otherwise some of them will cause an abort. This is done automatically for you when you do a d0setup xframe (see setup and running), but you have to have the proper library defined (libtest...).
After each record (event) is read into ZEBRA, a logical function D0XUSER is called. The library (dummy) version will return .TRUE. every time. You can, however, link d0x with your own version of D0XUSER. This routine will be able to access the data in the normal way since you have linked it with the entire D0 library. The goal is to be able to do physics analysis (not reconstruction) with this routine although in principle you can link in any packages you want, but you have to call them by "hand". The following describes how to link, use, etc. D0XUSER. First, hit the D0XUser Menu... button to get the following menu should appear:

Functionality is described here. First, the following entry points are called by D0X. Note that each entry is a logical function, returning .TRUE. or .FALSE., and each entry allows passing a single integer parameters which is set to 0 by D0X, but can be changed dynamically using the buttons in the menu:
D0X will call the logical function D0XUSER once per read of a data event with a single integer argument preset to 0:
flag = D0XUSER(iarg)
Your code should look like this (see D0$XFRAME$SOURCE:D0XUSER.FOR for the
dummy version):
› LOGICAL FUNCTION D0XUSER(iarg)and you should set D0XUSER=.TRUE. or .FALSE. just like you would if you were writing a package for the D0USER frame. Remember, the integer argument iarg will always be 0 when called by the D0X framework.
D0X will call the logical function D0XUSER_INIT at startup time. The dummy version in the library returns .TRUE.
This entry, D0XUSER_TALK, is for interactive use (setting parameters). The entry is only callable via the buttons in the D0XUser menu.
This entry, D0XUSER_FINISH, is only callable via the buttons in the D0XUser menu. It is meant for outputting results, histogram, etc.. This entry and the talk entry can be combined, but are left separate for convience.
The following explains more about how to use D0XUSER:
If you want to call D0XUSER for something OTHER than once per event, or you want to call one of the other entries described above, you do this via the appropriate button in the D0XUser menu (as displayed here). You will be asked to provide a value for the integer argument iarg. It is up to you to write your code so that it knows what to do with this value (obviously). Of course, you don't have to access iarg within your code, but you have to supply it when calling entries interactive.
See Event Output
Here's how to link in your custom version of D0XUSER into D0X. say that you create d0xuser in a file MINE.FOR. you compile the file MINE to create MINE.OBJ, and do the following:
link_d0x mine [debug]If you specify "debug" as the LAST argument, you will get a debug executable. Note that there's alot of C-code in D0X, so at VMS the DEBUG> prompt you should do this:
DEBUG> set language fortran
otherwise it's expecting C and the debug commands for C are different
than those for FORTRAN. Unix debuggers don't care.
Note that if your link needs more than the list of libraries which D0X uses, you can provide them by hand. For instance, if you need to link in your own library (e.g. sys$login:mylib.olb) you can link it in via:
link_d0x mine,sys$login:mylib/lib [debug]
You can toggle the calling of D0XUSER per event by pushing the Enabled/Disabled button.
Push this button and the statistics of .TRUE. and .FALSE. (and total) are displayed in the little text window under the Enabled/Disabled button. Push the Clear button to clear the statistics.