CMS 3D CMS Logo

CSCDMBHeader2005.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCDMBHeader2005_h
2 #define EventFilter_CSCRawToDigi_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  //ostream & operator<<(ostream &, const CSCDMBHeader2005 &);
57 
58  // private:
59 
60  struct {
62  unsigned dmb_l1a_lowo : 12;
64  unsigned newddu_code_1 : 4;
65 
67  unsigned dmb_l1a_hiwo : 12;
69  unsigned newddu_code_2 : 4;
70 
72  unsigned cfeb_dav_1 : 5;
73  unsigned cfeb_active : 5;
74  unsigned alct_dav_4 : 1;
75  unsigned tmb_dav_4 : 1;
77  unsigned newddu_code_3 : 4;
78 
80  unsigned dmb_bxn1 : 12;
82  unsigned newddu_code_4 : 4;
83 
85  unsigned cfeb_dav : 5; //5
86  unsigned alct_dav_1 : 1; // start 1
87  unsigned active_dav_mismatch : 1; // new
88  unsigned tmb_dav_1 : 1;
89  unsigned active_dav_mismatch_2 : 1; // new
90  unsigned alct_dav_2 : 1;
91  unsigned active_dav_mismatch_3 : 1; // new
92  unsigned tmb_dav_2 : 1;
94  unsigned ddu_code_1 : 4;
95 
97  unsigned dmb_id : 4;
98  unsigned dmb_crate : 8;
100  unsigned ddu_code_2 : 4;
101 
103  unsigned dmb_bxn : 7;
106  unsigned cfeb_movlp : 5;
108  unsigned ddu_code_3 : 4;
109 
111  unsigned dmb_l1a : 8;
112  unsigned dmb_cfeb_sync : 4;
114  unsigned ddu_code_4 : 4;
115  } bits;
116 };
117 
118 #endif
unsigned activeDavMismatch() const override
unsigned newddu_code_3
constant, should be 1001
unsigned bxn() const override
unsigned dmb_bxn1
4th Header word
unsigned ddu_code_4
constant, should be &#39;1010&#39;
void setdmbVersion(unsigned int version) override
unsigned l1a() const override
unsigned ddu_code_3
constant, should be &#39;1010&#39;
unsigned active_dav_mismatch_2
unsigned active_dav_mismatch
unsigned dmb_l1a_lowo
1st Header word
unsigned dmb_bxn
7th Header word
void setL1A24(int l1a) override
void setdmbID(int newDMBID) override
unsigned short * data() const 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 short * data() override
void setBXN(int bxn) override
unsigned cfebActive() const override
unsigned bxn12() const override
unsigned dmbID() const override
void setL1A(int l1a) override
unsigned crateID() const override
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 sizeInWords() const override
unsigned dmb_l1a
8th Header word
unsigned nclct() const override
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 active_dav_mismatch_3
unsigned cfebAvailable() const override
bool check() const override
unsigned dmb_l1a_hiwo
2nd Header word
unsigned format_version() const override
unsigned ddu_code_1
constant, should be &#39;1010&#39;
struct CSCDMBHeader2005::@488 bits
unsigned cfebMovlp() const override
unsigned l1a24() const override
unsigned nalct() const override
unsigned dmbCfebSync() const override