CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCDMBTrailer.h
Go to the documentation of this file.
1 #ifndef CSCDMBTrailer_h
2 #define CSCDMBTrailer_h
3 
5 class CSCDMBHeader;
6 
7 class CSCDMBTrailer {
8 public:
10  {
11  bzero(this, sizeInWords()*2);
14  }
15 
17  {
18  memcpy(this, digi.trailer(), sizeInWords()*2);
19  }
20 
21 
24 
25  unsigned short * data() {return (unsigned short *) this;}
26  unsigned short * data() const {return (unsigned short *) this;}
27 
28  unsigned L1a_counter : 8;
29  unsigned dmb_bxn : 4;
30  unsigned ddu_code_1 : 4;
31 
32  unsigned cfeb_half : 5;
33  unsigned tmb_half : 1;
34  unsigned alct_half : 1;
35  unsigned cfeb_movlp : 5;
36  unsigned ddu_code_2 : 4;
37 
38  unsigned tmb_timeout : 1;
39  unsigned alct_timeout : 1;
40  unsigned tmb_empty : 1;
41  unsigned alct_empty : 1;
42  unsigned dmb_l1pipe : 8;
43  unsigned ddu_code_3 : 4;
44 
45  unsigned cfeb_starttimeout : 5;
46  unsigned tmb_endtimeout : 1;
47  unsigned alct_endtimeout : 1;
48  unsigned cfeb_endtimeout : 5;
49  unsigned ddu_code_4 : 4;
50 
51 
52  unsigned cfeb_empty : 5;
53  unsigned cfeb_full : 5;
54  unsigned tmb_full : 1;
55  unsigned alct_full : 1;
56  unsigned ddu_code_5 : 4;
57 
58  unsigned dmb_id : 4;
59  unsigned crate_id : 8;
60  unsigned ddu_code_6 : 4;
61 
62  unsigned dmb_crc_1 : 11;
63  unsigned dmb_parity_1 : 1;
64  unsigned ddu_code_7 : 4;
65 
66  unsigned dmb_crc_2 : 11;
67  unsigned dmb_parity_2 : 1;
68  unsigned ddu_code_8 : 4;
69 
70  bool check() const {return ddu_code_1 == 0xF && ddu_code_2 == 0xF
71  && ddu_code_3 == 0xF && ddu_code_4 == 0xF
72  && ddu_code_5 == 0xE && ddu_code_6 == 0xE
73  && ddu_code_7 == 0xE && ddu_code_8 == 0xE;}
74 
75  static unsigned sizeInWords() {return 8;}
76 };
77 
78 #endif
79 
unsigned dmb_crc_2
Definition: CSCDMBTrailer.h:66
unsigned dmb_parity_1
Definition: CSCDMBTrailer.h:63
unsigned ddu_code_1
Definition: CSCDMBTrailer.h:30
unsigned alct_endtimeout
Definition: CSCDMBTrailer.h:47
unsigned cfeb_half
Definition: CSCDMBTrailer.h:32
unsigned tmb_endtimeout
Definition: CSCDMBTrailer.h:46
unsigned tmb_timeout
Definition: CSCDMBTrailer.h:38
unsigned ddu_code_2
Definition: CSCDMBTrailer.h:36
unsigned alct_full
Definition: CSCDMBTrailer.h:55
unsigned dmb_bxn
Definition: CSCDMBTrailer.h:29
unsigned cfeb_full
Definition: CSCDMBTrailer.h:53
bool check() const
Definition: CSCDMBTrailer.h:70
unsigned dmb_parity_2
Definition: CSCDMBTrailer.h:67
unsigned ddu_code_4
Definition: CSCDMBTrailer.h:49
unsigned cfeb_empty
Definition: CSCDMBTrailer.h:52
unsigned short * data() const
Definition: CSCDMBTrailer.h:26
unsigned short * data()
Definition: CSCDMBTrailer.h:25
unsigned cfeb_movlp
Definition: CSCDMBTrailer.h:35
unsigned alct_timeout
Definition: CSCDMBTrailer.h:39
unsigned cfeb_starttimeout
Definition: CSCDMBTrailer.h:45
unsigned alct_empty
Definition: CSCDMBTrailer.h:41
unsigned L1a_counter
Definition: CSCDMBTrailer.h:28
unsigned ddu_code_8
Definition: CSCDMBTrailer.h:68
unsigned tmb_half
Definition: CSCDMBTrailer.h:33
unsigned crate_id
Definition: CSCDMBTrailer.h:59
unsigned ddu_code_3
Definition: CSCDMBTrailer.h:43
CSCDMBTrailer(const CSCDMBStatusDigi &digi)
Definition: CSCDMBTrailer.h:16
unsigned ddu_code_5
Definition: CSCDMBTrailer.h:56
unsigned dmb_l1pipe
Definition: CSCDMBTrailer.h:42
unsigned cfeb_endtimeout
Definition: CSCDMBTrailer.h:48
const uint16_t * trailer() const
unsigned tmb_full
Definition: CSCDMBTrailer.h:54
unsigned dmb_crc_1
Definition: CSCDMBTrailer.h:62
void setEventInformation(const CSCDMBHeader &)
@ NEEDS TO BE DONE
Definition: CSCDMBTrailer.h:23
unsigned ddu_code_7
Definition: CSCDMBTrailer.h:64
unsigned alct_half
Definition: CSCDMBTrailer.h:34
unsigned tmb_empty
Definition: CSCDMBTrailer.h:40
unsigned dmb_id
Definition: CSCDMBTrailer.h:58
static unsigned sizeInWords()
Definition: CSCDMBTrailer.h:75
unsigned ddu_code_6
Definition: CSCDMBTrailer.h:60