CMS 3D CMS Logo

CSCDMBHeader2005.h
Go to the documentation of this file.
1 #ifndef CSCDMBHeader2005_h
2 #define CSCDMBHeader2005_h
3 
4 #include <cassert>
5 #include <iosfwd>
6 #include <cstring> // bzero
9 
11 // public:
12 
14 
15  CSCDMBHeader2005(const uint16_t * buf);
16 /*
17  CSCDMBHeader2005(const CSCDMBStatusDigi & digi)
18  {
19  memcpy(this, digi.header(), sizeInWords()*2);
20  }
21 */
22  bool cfebAvailable(unsigned icfeb) override;
23 
24  void addCFEB(int icfeb) override;
25  void addNCLCT() override;
26  void addNALCT() override;
27  void setBXN(int bxn) override;
28  void setL1A(int l1a) override;
29  void setL1A24(int l1a) override;
30  void setCrateAddress(int crate, int dmbId) override;
31  void setdmbID(int newDMBID) override {bits.dmb_id = newDMBID;}
32  void setdmbVersion(unsigned int version) override {}
33 
34  unsigned cfebActive() const override {return bits.cfeb_active;}
35  unsigned crateID() const override;
36  unsigned dmbID() const override;
37  unsigned bxn() const override;
38  unsigned bxn12() const override;
39  unsigned l1a() const override;
40  unsigned l1a24() const override;
41  unsigned cfebAvailable() const override;
42  unsigned nalct() const override;
43  unsigned nclct() const override;
44  unsigned cfebMovlp() const override;
45  unsigned dmbCfebSync() const override;
46  unsigned activeDavMismatch() const override;
47  unsigned format_version() const override;
48 
49  unsigned sizeInWords() const override;
50 
51  bool check() const override;
52 
53  unsigned short * data() override {return (unsigned short *)(&bits);}
54  unsigned short * data() const override {return (unsigned short *)(&bits);}
55 
56 
57  //ostream & operator<<(ostream &, const CSCDMBHeader2005 &);
58 
59 // private:
60 
61  struct {
62 
64  unsigned dmb_l1a_lowo : 12;
66  unsigned newddu_code_1 : 4;
67 
69  unsigned dmb_l1a_hiwo : 12;
71  unsigned newddu_code_2 : 4;
72 
74  unsigned cfeb_dav_1 : 5;
75  unsigned cfeb_active : 5;
76  unsigned alct_dav_4 : 1;
77  unsigned tmb_dav_4 : 1;
79  unsigned newddu_code_3 : 4;
80 
81 
83  unsigned dmb_bxn1 : 12;
85  unsigned newddu_code_4 : 4;
86 
88  unsigned cfeb_dav : 5; //5
89  unsigned alct_dav_1 : 1; // start 1
90  unsigned active_dav_mismatch : 1; // new
91  unsigned tmb_dav_1 : 1;
92  unsigned active_dav_mismatch_2 : 1; // new
93  unsigned alct_dav_2 : 1;
94  unsigned active_dav_mismatch_3 : 1; // new
95  unsigned tmb_dav_2 : 1;
97  unsigned ddu_code_1 : 4;
98 
100  unsigned dmb_id : 4;
101  unsigned dmb_crate : 8;
103  unsigned ddu_code_2: 4;
104 
106  unsigned dmb_bxn : 7;
109  unsigned cfeb_movlp : 5;
111  unsigned ddu_code_3 : 4;
112 
114  unsigned dmb_l1a : 8;
115  unsigned dmb_cfeb_sync : 4;
117  unsigned ddu_code_4 : 4;
118  } bits;
119 
120 
121 };
122 
123 #endif
124 
unsigned short * data() const override
unsigned l1a() const override
unsigned crateID() const override
unsigned newddu_code_3
constant, should be 1001
unsigned dmb_bxn1
4th Header word
unsigned ddu_code_4
constant, should be &#39;1010&#39;
void setdmbVersion(unsigned int version) override
unsigned cfebActive() const override
unsigned ddu_code_3
constant, should be &#39;1010&#39;
unsigned cfebMovlp() const override
unsigned activeDavMismatch() const override
unsigned active_dav_mismatch_2
unsigned l1a24() const override
unsigned active_dav_mismatch
bool check() const override
unsigned dmb_l1a_lowo
1st Header word
unsigned nclct() const override
unsigned dmb_bxn
7th Header word
unsigned format_version() const override
void setL1A24(int l1a) override
void setdmbID(int newDMBID) override
unsigned cfeb_dav_1
3rd Header word
void addNALCT() override
void addCFEB(int icfeb) override
unsigned newddu_code_2
constant, should be 1001
unsigned cfebAvailable() const override
unsigned nalct() const override
unsigned short * data() override
void setBXN(int bxn) override
unsigned sizeInWords() const override
void setL1A(int l1a) override
struct CSCDMBHeader2005::@374 bits
unsigned newddu_code_1
constant, should be 1001
unsigned dmb_id
6th Header word
void setCrateAddress(int crate, int dmbId) override
void addNCLCT() override
unsigned dmb_l1a
8th Header word
unsigned cfeb_dav
5th Header word
unsigned newddu_code_4
constant, should be 1001
unsigned ddu_code_2
constant, should be &#39;1010&#39;
unsigned dmbID() const override
unsigned active_dav_mismatch_3
unsigned dmbCfebSync() const override
unsigned bxn() const override
unsigned bxn12() const override
unsigned dmb_l1a_hiwo
2nd Header word
unsigned ddu_code_1
constant, should be &#39;1010&#39;