Start by looking at the data structure diagram at the start of these notes and the bank summaries to decided which bank(s) you want to look access. To get more detail about a particular bank e.g. bank xxxx, see:-
Companion/Event Data Structure
When you write the code you will need the file z.inc to give you access to the main ZEBRA memory and a pointer to the MAST bank. The stardard print unit IQPRNT can be found in zunit.inc. For every bank you access you will also need its bank_xxxx.inc. As a simple example, consider the following code fragment to access the FTx* subtree for the time fitter:-
include 'bank_mast.inc' include 'bank_ev.inc' include 'bank_ft.inc' include 'bank_ftt.inc' include 'z.inc' include 'zunit.inc' integer lev_cur, lft_cur, lftt_cur lft_cur = 0 if (lmast .ne. 0) then lev_cur = lq(lmast - kmast_ev) if (lev_cur .ne. 0) lft_cur = lq(lev_cur - kev_ft) endif lftt_cur = 0 if (lft_cur .ne. 0) lftt_cur = lq(lft_cur - kft_ftt) if (lftt_cur .eq. 0) then write(iqprnt,*) ' Cannot find an FTT bank.' else write(iqprnt,*) + ' PMTs hit:' , iq(lftt_cur + kftx_pmt_avail), + ' chi-squared:', rq(lftt_cur + kftt_chi) endif
Take careful note of the fact that you use the lq array to step between banks using negative offsets, but use the iq and rq arrays to get data from the banks with positive offsets. Also note that bank_ft.inc contains the mnemonics that are standard to all FT* banks, but that the chi-squared, being specific to the time fitter, has its address mnemonic defined in bank_ftt.inc