Utility Package for Sunsort

Relies on: Sunsort
C include file: hitsubs.h
FORTRAN include file: hitsubs.i

This package contains useful standard routines to help with checking data. The routines only look at the raw ADC lists, and are consequently safe for use with any sort code.

Routines

void chann_dump(int dumpflag, int maxchans)
subroutine chann_dump(integer dumpflag, integer maxchans)

This routine examines the first maxchans ADC channels, and, depending on the value of dumpflags, increments maxchans+2 1d spectra (they must be defined in the sort code), or dumps the event to the terminal, or both.

ADC(1) goes into spectrum 1, ADC(2) into spectrum 2 etc. Spectrum maxchans+1 holds a summary of how many non-zero hits were in each channel. Spectrum maxchans+2 holds a summary of how many zero hits were in each channel

void adclist_dump()
subroutine adclist_dump

This routine writes both the adclist array and the elements of the adc array which are greater than or equal to 0 to the terminal. This is useful for checking that your code is reading the adclist and/or the adc array correctly.

void input_adcvals()
No FORTRAN equivalent yet.

This routine provides a way of entering ADC values from the keyboard directly into the sort code. This is useful for testing sort codes.

This routine is broken at the moment.

void plot_hits(int sp1_channsat, int sp1_zeroat, int sp2_ahit, int sp2_thit)
subroutine plot_hits(integer sp1_channsat, integer sp1_zeroat, integer sp2_ahit, integer sp2_thit)

Generate 1d channel hit and zero hit plots showing which ADC channels are being hit and which are getting zeroes, and also generate 2d `tartan' plot showing which ADCs fired with which other ADCs. sp1_channsat is the number of the 1d spectrum to hold the non-zero hit spectrum, sp1_zeroat is the number of the 1d spectrum to hold the zero hit spectrum, sp2_ahit and sp2_thit hold the numbers of the 2d spectra to hold ADC and TDC hits.

This routine still needs some work. Still to do are:


Steven M. Singer
Last modified: Tue Sep 21 17:53:23 BST 1999