/*TB_DEFS.H of 2-May-1995. This is a file to declare the shared storage that is specific to the suite. The words and bits herein are used to control the suite. 16-Feb-1995. JCH. Initial version from SK.010. 17-Mar-1995. JCH. Don't want group - irrelevant for real DAQ. 31-Mar-1995. JCH. Add sirocco information, and spill counter. 11-Apr-1995. JCH. Add readout info in more general way (I hope...). 18-Apr-1995. JCH. Define data length in SOB/EOB/EOR/SOR for detector info. 2-May-1995. JCH. Variables to handle beam type etc. */ #include "msg_defs.h" #define MAX_MODULES 10 /*maximum number of modules of any one type*/ /* now define detector types */ #define DETECTOR_TDC 1 #define DETECTOR_TELESCOPE 2 #define DETECTOR_ADAM 3 #define DETECTOR_APV5 4 #define DETECTOR_BINARY 5 #define DETECTOR_FELIX32 6 #define DETECTOR_KEYSTONE 7 #define DETECTOR_FELIX128 8 /*now declare a list of detector types*/ char *detector_list[] = {"Illegal","TDC","Telescope","ADAM","APV5", "Binary","FELIX32","Keystone","FELIX128"}; /*the next define means we don't have to count the above list!*/ #define DETECTOR_TYPES (sizeof(detector_list)/sizeof(char *)) struct tb_header { int ev_count ; /*event counter*/ int spill_count; /*spill counter */ int run_num ; /*run nmber*/ int op_status ; /*operational status */ int max_size ; /*maximum size of event allowed*/ int sequence_no ; /*sequence number for debug output*/ int delay ; /*delay between generated events*/ int lastevsn ; /*for _START to _INT at restart run*/ int autostop ; /*number of events before autostop*/ int run_type; /*type of run (beam, etc)*/ int beam_type; /*particle type*/ int beam_energy; /*particle energy*/ int detector_total ; /*number of detector types defined */ int detector_count[DETECTOR_TYPES] ; /*module count for each detector*/ unsigned int module_address[DETECTOR_TYPES][MAX_MODULES] ; /*VME addresses of modules*/ int module_private[DETECTOR_TYPES][MAX_MODULES] ; /*typically number of words to read*/ unsigned int unix_address[DETECTOR_TYPES][MAX_MODULES]; /*unix addresss*/ int sob_data_length[DETECTOR_TYPES]; /*length of module info in SOB*/ int eob_data_length[DETECTOR_TYPES]; /*ditto for EOB*/ int sor_data_length[DETECTOR_TYPES]; /*ditto for SOR*/ int eor_data_length[DETECTOR_TYPES]; /*ditto for EOR*/ char kbrd_input[80]; /*character string input from keyboard */ } ; /*the bits in op_status are defined here*/ #define INT_ACTIVE 1 /*set while interrupts vetoed*/ #define RUN_ACTIVE 2 /*set if a run is active*/ #define RUN_SWEEPER 4 /*set to generate a sweeper event*/ #define DEBUG_TYPING 8 /*set to force debug typing*/ #define GEN_PARITY 16 /*set to force parity generation*/ #define EVT_FIXED 32 /*set if want fixed event sizes*/ #define EVT_RANDOM 64 /*set if want random. [if neither - sequential used]*/ #define RUN_FIRST 128 /*set if first in run*/ #define TEST_RUN 1024 /*set for test runs*/ #define DATA_RUN 2048 /*set for data runs*/ /* now the different event types.*/ #define SIGNAL_EVENT 1 #define SIGNAL_SOB 2 #define SIGNAL_EOB 3 #define SIGNAL_SOR 4 #define SIGNAL_EOR 5 /*define name for the shared area*/ char *TB_NAME = "tb_share" ; char *SUITE_NAME = "tb_daq" ; char errstring[80] ; /*workspace for EMU output*/ /*end of TB_DEFS for now*/