00001 #ifndef _DDL_STRUCT_H_
00002 #define _DDL_STRUCT_H_
00003
00004
00005 #include <sys/types.h>
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #define DDL_STRUCT_VERSION 15 // test version...
00054
00055 #define DDL_TYPE_LOG 0 // log aka ascii data
00056 #define DDL_TYPE_LOG_V 0
00057
00058 #define DDL_TYPE_DTA 1 // triggered data with altros
00059 #define DDL_TYPE_DTA_V 0
00060
00061 #define DDL_TYPE_RC 2 // Start/Stop run events
00062 #define DDL_TYPE_RC_V 0
00063
00064 #define DDL_TYPE_MSC 3 // anything, look at subtype
00065 #define DDL_TYPE_MSC_V 0
00066
00067 #define DDL_HEADER(t,s) ((DDL_STRUCT_VERSION<<28)|(t<<0)|(s<<4))
00068
00069 struct ddl_header {
00070 u_int type ;
00071 u_int ev_cou ;
00072 } ;
00073
00074 struct ddl_trailer {
00075 u_int fl_wc ;
00076 u_int type ;
00077 } ;
00078
00079 struct ddl_file_header {
00080 char ctype[4] ;
00081 u_int wc ;
00082 u_int res[4] ;
00083 } ;
00084
00085
00086
00087
00088 #define DDL_DTA_NORMAL 0 // used for the ALTRO readout or for Trigger-only events
00089 #define DDL_DTA_CFG 1
00090 #define DDL_DTA_EMUL 2 // emulated data...
00091
00092 #define DDL_MSC_ANY 0
00093 #define DDL_MSC_CONFIG 1
00094 #define DDL_MSC_HEARTBEAT 2
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108 struct trg_data {
00109 u_int rhic_counter ;
00110 u_int csr ;
00111 u_int data ;
00112 } ;
00113
00114
00115 struct fee_cfg {
00116 u_int fl_id ;
00117 u_int b_x_s ;
00118
00119 } ;
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143 #endif