00001 #ifndef CSCDMBTrailer_h 00002 #define CSCDMBTrailer_h 00003 00004 #include "DataFormats/CSCDigi/interface/CSCDMBStatusDigi.h" 00005 class CSCDMBHeader; 00006 00007 class CSCDMBTrailer { 00008 public: 00009 CSCDMBTrailer() 00010 { 00011 bzero(this, sizeInWords()*2); 00012 ddu_code_1 = ddu_code_2 = ddu_code_3 = ddu_code_4 = 0xF; 00013 ddu_code_5 = ddu_code_6 = ddu_code_7 = ddu_code_8 = 0xE; 00014 } 00015 00016 CSCDMBTrailer(const CSCDMBStatusDigi & digi) 00017 { 00018 memcpy(this, digi.trailer(), sizeInWords()*2); 00019 } 00020 00021 00023 void setEventInformation(const CSCDMBHeader &) {}; 00024 00025 unsigned short * data() {return (unsigned short *) this;} 00026 unsigned short * data() const {return (unsigned short *) this;} 00027 00028 unsigned L1a_counter : 8; 00029 unsigned dmb_bxn : 4; 00030 unsigned ddu_code_1 : 4; 00031 00032 unsigned cfeb_half : 5; 00033 unsigned tmb_half : 1; 00034 unsigned alct_half : 1; 00035 unsigned cfeb_movlp : 5; 00036 unsigned ddu_code_2 : 4; 00037 00038 unsigned tmb_timeout : 1; 00039 unsigned alct_timeout : 1; 00040 unsigned tmb_empty : 1; 00041 unsigned alct_empty : 1; 00042 unsigned dmb_l1pipe : 8; 00043 unsigned ddu_code_3 : 4; 00044 00045 unsigned cfeb_starttimeout : 5; 00046 unsigned tmb_endtimeout : 1; 00047 unsigned alct_endtimeout : 1; 00048 unsigned cfeb_endtimeout : 5; 00049 unsigned ddu_code_4 : 4; 00050 00051 00052 unsigned cfeb_empty : 5; 00053 unsigned cfeb_full : 5; 00054 unsigned tmb_full : 1; 00055 unsigned alct_full : 1; 00056 unsigned ddu_code_5 : 4; 00057 00058 unsigned dmb_id : 4; 00059 unsigned crate_id : 8; 00060 unsigned ddu_code_6 : 4; 00061 00062 unsigned dmb_crc_1 : 11; 00063 unsigned dmb_parity_1 : 1; 00064 unsigned ddu_code_7 : 4; 00065 00066 unsigned dmb_crc_2 : 11; 00067 unsigned dmb_parity_2 : 1; 00068 unsigned ddu_code_8 : 4; 00069 00070 bool check() const {return ddu_code_1 == 0xF && ddu_code_2 == 0xF 00071 && ddu_code_3 == 0xF && ddu_code_4 == 0xF 00072 && ddu_code_5 == 0xE && ddu_code_6 == 0xE 00073 && ddu_code_7 == 0xE && ddu_code_8 == 0xE;} 00074 00075 static unsigned sizeInWords() {return 8;} 00076 }; 00077 00078 #endif 00079