CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <string.h> // bzero
9 
11 // public:
12 
14 
15  CSCDMBHeader2005(unsigned short * buf);
16 /*
17  CSCDMBHeader2005(const CSCDMBStatusDigi & digi)
18  {
19  memcpy(this, digi.header(), sizeInWords()*2);
20  }
21 */
22  virtual bool cfebAvailable(unsigned icfeb);
23 
24  virtual void addCFEB(int icfeb);
25  virtual void addNCLCT();
26  virtual void addNALCT();
27  virtual void setBXN(int bxn);
28  virtual void setL1A(int l1a);
29  virtual void setL1A24(int l1a);
30  virtual void setCrateAddress(int crate, int dmbId);
31  virtual void setdmbID(int newDMBID) {bits.dmb_id = newDMBID;}
32  virtual void setdmbVersion(unsigned int version) {}
33 
34  virtual unsigned cfebActive() const {return bits.cfeb_active;}
35  virtual unsigned crateID() const;
36  virtual unsigned dmbID() const;
37  virtual unsigned bxn() const;
38  virtual unsigned bxn12() const;
39  virtual unsigned l1a() const;
40  virtual unsigned l1a24() const;
41  virtual unsigned cfebAvailable() const;
42  virtual unsigned nalct() const;
43  virtual unsigned nclct() const;
44  virtual unsigned cfebMovlp() const;
45  virtual unsigned dmbCfebSync() const;
46  virtual unsigned activeDavMismatch() const;
47  virtual unsigned format_version() const;
48 
49  unsigned sizeInWords() const;
50 
51  virtual bool check() const;
52 
53  virtual unsigned short * data() {return (unsigned short *)(&bits);}
54  virtual unsigned short * data() const {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 
virtual void addNALCT()
virtual unsigned activeDavMismatch() const
virtual void addCFEB(int icfeb)
unsigned newddu_code_3
constant, should be 1001
virtual unsigned cfebAvailable() const
unsigned dmb_bxn1
4th Header word
unsigned ddu_code_4
constant, should be &#39;1010&#39;
virtual unsigned format_version() const
unsigned ddu_code_3
constant, should be &#39;1010&#39;
virtual void setdmbVersion(unsigned int version)
unsigned active_dav_mismatch_2
virtual unsigned cfebMovlp() const
virtual unsigned dmbCfebSync() const
unsigned active_dav_mismatch
virtual unsigned bxn() const
unsigned dmb_l1a_lowo
1st Header word
unsigned dmb_bxn
7th Header word
unsigned cfeb_dav_1
3rd Header word
virtual unsigned nalct() const
unsigned newddu_code_2
constant, should be 1001
virtual unsigned l1a24() const
virtual unsigned cfebActive() const
virtual unsigned short * data()
unsigned newddu_code_1
constant, should be 1001
virtual void setCrateAddress(int crate, int dmbId)
virtual unsigned bxn12() const
unsigned dmb_id
6th Header word
virtual unsigned crateID() const
virtual void addNCLCT()
virtual void setdmbID(int newDMBID)
unsigned dmb_l1a
8th Header word
struct CSCDMBHeader2005::@302 bits
virtual unsigned nclct() const
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
virtual void setL1A24(int l1a)
unsigned sizeInWords() const
virtual bool check() const
virtual unsigned l1a() const
virtual void setL1A(int l1a)
virtual unsigned dmbID() const
unsigned dmb_l1a_hiwo
2nd Header word
virtual void setBXN(int bxn)
unsigned ddu_code_1
constant, should be &#39;1010&#39;
virtual unsigned short * data() const