CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/DataFormats/FEDRawData/src/fed_header.h

Go to the documentation of this file.
00001 /* NOTE: this file temporarily stolen from the XDAQ project
00002  * 
00003  * fed_header.h  
00004  *
00005  * $Header: /local/reps/CMSSW/CMSSW/DataFormats/FEDRawData/src/fed_header.h,v 1.2 2005/10/06 18:25:22 namapane Exp $
00006  *
00007  * This file contains the struct definition of the FED-header.
00008  * The FED-header is inserted by the FED at the top of a data fragment
00009  */
00010 
00011 
00012 #ifndef _FED_HEADER_H
00013 #define _FED_HEADER_H
00014 
00015 #ifdef __cplusplus
00016 extern "C" {
00017 #endif
00018 
00019 
00020 /*************************************************************************
00021  *
00022  * data structures and associated typedefs
00023  *
00024  *************************************************************************/
00025 
00026 
00027 /*
00028  * FED header - in front of each FED block
00029  */
00030 
00031 typedef struct fedh_struct {
00032   unsigned int sourceid ;   
00033   unsigned int eventid;
00034 } fedh_t ;
00035 
00036 
00037 #define FED_HCTRLID_MASK  0xF0000000
00038 #define FED_EVTY_MASK     0x0F000000
00039 #define FED_LVL1_MASK     0x00FFFFFF
00040 
00041 #define FED_BXID_MASK     0xFFF00000
00042 #define FED_SOID_MASK     0x000FFF00
00043 #define FED_VERSION_MASK  0x000000F0
00044 #define FED_MORE_HEADERS  0x00000008
00045 
00046 
00047 #define FED_HCTRLID       0x50000000
00048 
00049 
00050 #define FED_HCTRLID_SHIFT 28
00051 #define FED_EVTY_SHIFT    24
00052 #define FED_LVL1_SHIFT    0
00053 
00054 #define FED_BXID_SHIFT    20
00055 #define FED_SOID_SHIFT    8
00056 #define FED_VERSION_SHIFT 4
00057 
00058 #ifdef __cplusplus
00059 }
00060 #endif
00061 
00062 #endif  /* _FED_HEADER_H */
00063 
00064