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
CSCDMBHeader2005::setdmbVersion
void setdmbVersion(unsigned int version) override
Definition: CSCDMBHeader2005.h:32
CSCDMBHeader2005::cfebMovlp
unsigned cfebMovlp() const override
Definition: CSCDMBHeader2005.cc:12
CSCDMBHeader2005::check
bool check() const override
Definition: CSCDMBHeader2005.cc:73
CSCDMBHeader2005::cfebAvailable
unsigned cfebAvailable() const override
Definition: CSCDMBHeader2005.cc:18
CSCDMBHeader2005::dmb_bxn1
unsigned dmb_bxn1
4th Header word
Definition: CSCDMBHeader2005.h:80
CSCDMBHeader2005::bits
struct CSCDMBHeader2005::@453 bits
CSCDMBHeader2005::active_dav_mismatch_2
unsigned active_dav_mismatch_2
Definition: CSCDMBHeader2005.h:89
CSCDMBStatusDigi.h
CSCDMBHeader2005::dmb_l1a_hiwo
unsigned dmb_l1a_hiwo
2nd Header word
Definition: CSCDMBHeader2005.h:67
CSCDMBHeader2005::cfeb_movlp
unsigned cfeb_movlp
Definition: CSCDMBHeader2005.h:106
CSCDMBHeader2005::activeDavMismatch
unsigned activeDavMismatch() const override
Definition: CSCDMBHeader2005.cc:16
CSCDMBHeader2005::dmb_l1a_lowo
unsigned dmb_l1a_lowo
1st Header word
Definition: CSCDMBHeader2005.h:62
CSCDMBHeader2005::dmb_bxn
unsigned dmb_bxn
7th Header word
Definition: CSCDMBHeader2005.h:103
CSCDMBHeader2005::newddu_code_3
unsigned newddu_code_3
constant, should be 1001
Definition: CSCDMBHeader2005.h:77
CSCDMBHeader2005::active_dav_mismatch
unsigned active_dav_mismatch
Definition: CSCDMBHeader2005.h:87
CSCDMBHeader2005::tmb_dav_2
unsigned tmb_dav_2
Definition: CSCDMBHeader2005.h:92
CSCDMBHeader2005::bxn
unsigned bxn() const override
Definition: CSCDMBHeader2005.cc:28
CSCDMBHeader2005::setL1A24
void setL1A24(int l1a) override
Definition: CSCDMBHeader2005.cc:38
CSCDMBHeader2005::cfeb_active
unsigned cfeb_active
Definition: CSCDMBHeader2005.h:73
CSCDMBHeader2005::ddu_code_4
unsigned ddu_code_4
constant, should be '1010'
Definition: CSCDMBHeader2005.h:114
CSCDMBHeader2005::ddu_code_3
unsigned ddu_code_3
constant, should be '1010'
Definition: CSCDMBHeader2005.h:108
CSCDMBHeader2005::alct_dav_1
unsigned alct_dav_1
Definition: CSCDMBHeader2005.h:86
CSCDMBHeader2005::l1a
unsigned l1a() const override
Definition: CSCDMBHeader2005.cc:32
CSCDMBHeader2005::CSCDMBHeader2005
CSCDMBHeader2005()
Definition: CSCDMBHeader2005.cc:4
CSCDMBHeader2005::dmb_cfeb_sync
unsigned dmb_cfeb_sync
Definition: CSCDMBHeader2005.h:112
CSCDMBHeader2005::setdmbID
void setdmbID(int newDMBID) override
Definition: CSCDMBHeader2005.h:31
CSCDMBHeader2005::cfebActive
unsigned cfebActive() const override
Definition: CSCDMBHeader2005.h:34
CSCDMBHeader2005::addNALCT
void addNALCT() override
Definition: CSCDMBHeader2005.cc:71
CSCDMBHeader2005::bxn12
unsigned bxn12() const override
Definition: CSCDMBHeader2005.cc:30
CSCDMBHeader2005::data
unsigned short * data() override
Definition: CSCDMBHeader2005.h:53
CSCVDMBHeaderFormat.h
CSCDMBHeader2005::data
unsigned short * data() const override
Definition: CSCDMBHeader2005.h:54
CSCDMBHeader2005::setL1A
void setL1A(int l1a) override
Definition: CSCDMBHeader2005.cc:36
CSCDMBHeader2005::addNCLCT
void addNCLCT() override
Definition: CSCDMBHeader2005.cc:69
CSCDMBHeader2005::newddu_code_1
unsigned newddu_code_1
constant, should be 1001
Definition: CSCDMBHeader2005.h:64
CSCDMBHeader2005::alct_dav_4
unsigned alct_dav_4
Definition: CSCDMBHeader2005.h:74
CSCDMBHeader2005::dmbID
unsigned dmbID() const override
Definition: CSCDMBHeader2005.cc:26
CSCDMBHeader2005::addCFEB
void addCFEB(int icfeb) override
Definition: CSCDMBHeader2005.cc:63
CSCDMBHeader2005::cfeb_dav_1
unsigned cfeb_dav_1
3rd Header word
Definition: CSCDMBHeader2005.h:72
CSCDMBHeader2005::nclct
unsigned nclct() const override
Definition: CSCDMBHeader2005.cc:22
CSCDMBHeader2005::dmb_id
unsigned dmb_id
6th Header word
Definition: CSCDMBHeader2005.h:97
CSCDMBHeader2005
Definition: CSCDMBHeader2005.h:10
CSCDMBHeader2005::dmb_crate
unsigned dmb_crate
Definition: CSCDMBHeader2005.h:98
CSCDMBHeader2005::alct_dav_2
unsigned alct_dav_2
Definition: CSCDMBHeader2005.h:90
CSCDMBHeader2005::newddu_code_2
unsigned newddu_code_2
constant, should be 1001
Definition: CSCDMBHeader2005.h:69
CSCDMBHeader2005::setBXN
void setBXN(int bxn) override
Definition: CSCDMBHeader2005.cc:43
CSCDMBHeader2005::ddu_code_2
unsigned ddu_code_2
constant, should be '1010'
Definition: CSCDMBHeader2005.h:100
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCDMBHeader2005::tmb_dav_1
unsigned tmb_dav_1
Definition: CSCDMBHeader2005.h:88
CSCDMBHeader2005::cfeb_dav
unsigned cfeb_dav
5th Header word
Definition: CSCDMBHeader2005.h:85
CSCDMBHeader2005::crateID
unsigned crateID() const override
Definition: CSCDMBHeader2005.cc:24
CSCVDMBHeaderFormat
Definition: CSCVDMBHeaderFormat.h:8
CSCDMBHeader2005::newddu_code_4
unsigned newddu_code_4
constant, should be 1001
Definition: CSCDMBHeader2005.h:82
CSCDMBHeader2005::sizeInWords
unsigned sizeInWords() const override
Definition: CSCDMBHeader2005.cc:53
CSCDMBHeader2005::dmb_l1a
unsigned dmb_l1a
8th Header word
Definition: CSCDMBHeader2005.h:111
CSCDMBHeader2005::ddu_code_1
unsigned ddu_code_1
constant, should be '1010'
Definition: CSCDMBHeader2005.h:94
CSCDMBHeader2005::l1a24
unsigned l1a24() const override
Definition: CSCDMBHeader2005.cc:34
CSCDMBHeader2005::format_version
unsigned format_version() const override
Definition: CSCDMBHeader2005.cc:61
CSCDMBHeader2005::nalct
unsigned nalct() const override
Definition: CSCDMBHeader2005.cc:20
CSCDMBHeader2005::setCrateAddress
void setCrateAddress(int crate, int dmbId) override
Definition: CSCDMBHeader2005.cc:48
CSCDMBHeader2005::tmb_dav_4
unsigned tmb_dav_4
Definition: CSCDMBHeader2005.h:75
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
CSCDMBHeader2005::dmbCfebSync
unsigned dmbCfebSync() const override
Definition: CSCDMBHeader2005.cc:14
CSCDMBHeader2005::active_dav_mismatch_3
unsigned active_dav_mismatch_3
Definition: CSCDMBHeader2005.h:91