00001 /* dataFormats.h - definition of MINOS DAQ data formats */ 00002 00003 /* 00004 * Tim Nicholls, Real Time Systems Group 00005 * Geoff Pearce, Particle Physics Dept. 00006 * CLRC Rutherford Appleton Laboratory 00007 */ 00008 00009 /* 00010 * Current CVS Tag: 00011 * $Header: /cvs/minoscvs/rep1/minossoft/OnlineUtil/dataFormats.h,v 1.5 2004/11/29 20:55:31 rhatcher Exp $ 00012 */ 00013 00014 /* 00015 * Modification History : DO NOT EDIT - MAINTAINED BY CVS 00016 * $Log: dataFormats.h,v $ 00017 * Revision 1.5 2004/11/29 20:55:31 rhatcher 00018 * resync with online CVS repository as of 2004-11-18 00019 * 00020 * Revision 1.14 2004/11/17 22:41:14 gfp 00021 * Extended ROP time frame header now the default 00022 * 00023 * Revision 1.13 2004/04/28 21:15:27 gfp 00024 * Add generic raw digit (mdRawDigit) 00025 * 00026 * Revision 1.12 2004/04/12 15:02:03 gfp 00027 * Add extended ROP header for tests. Hidden behind USE_EXTENDED_ROP_HEADER until rolled out 00028 * 00029 * Revision 1.11 2003/08/26 13:06:28 gfp 00030 * Extend MBRP header and rename as TP header 00031 * 00032 * Revision 1.10 2002/06/10 07:44:44 gfp 00033 * Move data masks & macros to mdRawDataMasks 00034 * 00035 * Revision 1.9 2002/02/05 20:45:31 gfp 00036 * Remove MAX_NUMBER_CRATES 00037 * 00038 * Revision 1.8 2001/10/04 16:23:08 gfp 00039 * Include macros for Caen TDC 00040 * 00041 * Revision 1.7 2001/09/05 16:42:31 gfp 00042 * ADC Mask 14 bits, Add TOF VMM, Add Rop# mask, Drop mdTofHeader 00043 * 00044 * Revision 1.6 2001/06/28 13:06:44 tcn 00045 * Added TOF readout block header definition 00046 * 00047 * Revision 1.5 2001/06/11 16:20:11 gfp 00048 * Add (un)packing masks and macros 00049 * 00050 * Revision 1.4 2001/05/14 07:52:28 gfp 00051 * conform BRP header to md name space 00052 * 00053 * Revision 1.3 2001/05/03 13:05:25 gjc 00054 * Merged in Master BRP header from Geoff's version 00055 * 00056 * Revision 1.2 2001/05/01 13:21:59 tcn 00057 * Added more VARC masks etc 00058 * 00059 * Revision 1.1 2001/04/06 11:56:03 tcn 00060 * First commit of dataFormats.h 00061 * 00062 * 00063 */ 00064 00065 #ifndef _DATAFORMATS_H 00066 #define _DATAFORMATS_H 00067 #ifdef __cplusplus 00068 extern "C" { 00069 #endif /* __cplusplus */ 00070 00071 /* includes */ 00072 00073 /* defines */ 00074 00075 /* ========================================= 00076 * Number of long words in a readout element 00077 * ========================================= 00078 */ 00079 00080 #define RDOUT_SIZE_LONG 2 00081 00082 /* ========== 00083 * Raw digit. 00084 * ========== 00085 */ 00086 00087 typedef struct mdRawDigit_t { 00088 00089 long upper; /* High order 32 bits : containing address, etc*/ 00090 long lower; /* Low order 32 bits : containing timestamp, etc*/ 00091 00092 } mdRawDigit; 00093 00094 00095 00096 /* ============================================================== 00097 * Standard timestamp used in MINOS DAQ - this is the same as the 00098 * the POSIX timespec, namely number of seconds and nanoseconds 00099 * relative to the UNIX Epoch : 00:00 1st Jan 1970. 00100 * ============================================================== 00101 */ 00102 00103 typedef struct mdTimeStamp_t { 00104 00105 long sec; /* Seconds part of timestamp */ 00106 long nsec; /* Nanoseconds part of timestamp */ 00107 00108 } mdTimeStamp; 00109 00110 00111 /* ============================= 00112 * ROP (crate) time frame header 00113 * ============================= 00114 */ 00115 00116 typedef struct mdTimeFrameHdr_t { 00117 00118 long frameLenBytes; /* number of bytes in frame */ 00119 long headerLenBytes; /* number of bytes in header section */ 00120 long numDataBlocks; /* number of data blocks in frame */ 00121 long frameNumber; /* time frame number */ 00122 long ropNumber; /* source ROP (crate) number */ 00123 mdTimeStamp timeStamp; /* time stamp of start of frame */ 00124 long checksum; /* checksum calculated on time frame */ 00125 00126 /* 00127 * A list of data block sizes (bytes) follows, numDataBlocks long 00128 * If overlaps are enabled, the overlap block is the first block. 00129 * The last block is 'other data'. 00130 * Additional padding words are appended to the header as required 00131 * to ensure that the time frame ends on a 64bit word boundary. 00132 */ 00133 00134 } mdTimeFrameHdr; 00135 00136 00137 /* ===================================== 00138 * Trigger Farm (Full) Time Frame Header 00139 * ===================================== 00140 */ 00141 00142 typedef struct mdTpTimeFrameHeader_t { 00143 00144 long frameLenBytes; 00145 long headerLenBytes; 00146 long timeFrameNumber; 00147 long runNumber; 00148 long subRunNumber; 00149 long timeFramesDropped; 00150 long liBufferId; 00151 long opBufferId; 00152 long trgProcessingTime; 00153 long lipProcessingTime; 00154 00155 } mdTpTimeFrameHeader; 00156 00157 00158 /* global variable declarations*/ 00159 00160 /* function prototype declarations */ 00161 00162 #ifdef __cplusplus 00163 } 00164 #endif /* __cplusplus */ 00165 00166 #endif /* _DATAFORMATS_H */
1.3.9.1