00001 #ifndef _ICCP2K_H_
00002 #define _ICCP2K_H_
00003
00004 #include <sys/types.h>
00005 #include <daqFormats.h>
00006
00007
00008
00009 typedef unsigned int u_int;
00010 typedef unsigned short u_short;
00011 typedef unsigned char u_char;
00012
00013 #define CMD2_PING 0x01
00014 #define CMD2_DATA 0x02
00015 #define CMD2_RELEASE 0x03
00016 #define CMD2_RUN_DONE 0x04
00017 #define CMD2_LOG 0x05
00018 #define CMD2_L3_RELEASE 0x06
00019 #define CMD2_FUTURE_DATA 0x07
00020 #define CMD2_FUTURE_RELEASE 0x08
00021
00022
00023
00024 #define EVBFLAG_RAW_DATA (1<<0)
00025 #define EVBFLAG_FCF_DATA (1<<1)
00026 #define EVBFLAG_HLT (1<<2)
00027
00028
00029 #define EVBFLAG_L1ABORT (1<<11)
00030 #define EVBFLAG_L25ABORT (1<<12)
00031 #define EVBFLAG_L25TIMEOUT (1<<13)
00032 #define EVBFLAG_L3ABORT (1<<14)
00033
00034
00035
00036 struct iccp2k {
00037 u_int words;
00038 u_short srcNode;
00039 u_short dstNode;
00040 u_char srcTask;
00041 u_char dstTask;
00042 u_short token;
00043 u_char cmd;
00044 u_char pad1;
00045 u_short payload_words;
00046 };
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #define GB_PAYLOAD_VERSION 0xDA000002
00074
00075
00076
00077 struct gbPayload {
00078 u_int gbPayloadVersion;
00079
00080 union {
00081 EventDescriptor2008a EventDescriptor ;
00082 u_int eventDesc[sizeof(EventDescriptor2008a)/4];
00083 };
00084
00085
00086 u_int L3summary[4] ;
00087 u_int L2summary[2];
00088 u_int L1summary[2];
00089 u_int rtsDetMask;
00090 u_int eventNumber;
00091 u_int sec;
00092 u_int usec;
00093 u_int flags;
00094 u_int evp;
00095 u_int token;
00096 };
00097
00098
00100
00101
00102 struct gbPayload_0x01a {
00103
00104 union {
00105 EventDescriptor2008a EventDescriptor ;
00106 u_int eventDesc[sizeof(EventDescriptor2008a)/4];
00107 };
00108
00109
00110 u_int L3summary[4] ;
00111 u_int L2summary[2];
00112 u_int L1summary[2];
00113 u_int rtsDetMask;
00114 u_int eventNumber;
00115 u_int sec;
00116 u_int usec;
00117 u_int flags;
00118 u_int evp;
00119 u_int token;
00120 };
00121
00122
00123 struct gbPayload_0x01 {
00124
00125 union {
00126 EventDescriptor2007 EventDescriptor ;
00127 u_int eventDesc[sizeof(EventDescriptor2007)/4];
00128 };
00129
00130
00131 u_int L3summary[4] ;
00132 u_int L2summary[2];
00133 u_int L1summary[2];
00134 u_int rtsDetMask;
00135 u_int eventNumber;
00136 u_int sec;
00137 u_int usec;
00138 u_int flags;
00139 u_int evp;
00140 u_int token;
00141 };
00142
00144
00145
00146
00147 struct evpPayload {
00148 u_int run;
00149 u_int type;
00150 u_int seq;
00151 };
00152
00153 struct tapeMsg {
00154 int cmd;
00155 int tevt;
00156 int stream;
00157 };
00158
00159
00160 struct evtDoneMsg {
00161 u_short token;
00162 u_short status;
00163 };
00164
00165 #define EVB_SUMMARY_VERSION 1
00166
00167 struct EvbSummary_v1 {
00168 u_int version;
00169 u_int sz;
00170 u_int detectorsInRun;
00171 };
00172
00173 typedef EvbSummary_v1 EvbSummary;
00174
00175 #endif