CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CSCDMBHeader2013 Struct Reference

#include <CSCDMBHeader2013.h>

Inheritance diagram for CSCDMBHeader2013:
CSCVDMBHeaderFormat

Public Member Functions

unsigned activeDavMismatch () const override
 
void addCFEB (int icfeb) override
 
void addNALCT () override
 
void addNCLCT () override
 
unsigned bxn () const override
 
unsigned bxn12 () const override
 
unsigned cfebActive () const override
 
bool cfebAvailable (unsigned icfeb) override
 counts from zero More...
 
unsigned cfebAvailable () const override
 
unsigned cfebMovlp () const override
 
bool check () const override
 
unsigned crateID () const override
 
 CSCDMBHeader2013 ()
 
 CSCDMBHeader2013 (const uint16_t *buf)
 
unsigned short * data () override
 
unsigned short * data () const override
 
unsigned dmbCfebSync () const override
 
unsigned dmbID () const override
 
unsigned format_version () const override
 
unsigned l1a () const override
 
unsigned l1a24 () const override
 
unsigned nalct () const override
 
unsigned nclct () const override
 
void setBXN (int bxn) override
 
void setCrateAddress (int crate, int dmbId) override
 
void setdmbID (int newDMBID) override
 
void setdmbVersion (unsigned int version) override
 
void setL1A (int l1a) override
 
void setL1A24 (int l1a) override
 
unsigned sizeInWords () const override
 
- Public Member Functions inherited from CSCVDMBHeaderFormat
virtual ~CSCVDMBHeaderFormat ()
 

Public Attributes

struct {
   unsigned   alct_dav: 1
 TMB_DAV(1) More...
 
   unsigned   alct_dav_copy: 1
 TMB_DAV(1) More...
 
   unsigned   alct_dav_copy2: 1
 TMB_DAV(1) More...
 
   unsigned   cfeb_clct_sent: 7
 constant, should be 1001 More...
 
   unsigned   cfeb_dav: 7
 constant, should be 1001 More...
 
   unsigned   cfeb_movlp: 5
 
   unsigned   clct_dav_mismatch: 1
 CFEB_CLCT_SENT(7:1) More...
 
   unsigned   clct_dav_mismatch_copy: 1
 CFEB_DAV(7:1) More...
 
   unsigned   clct_dav_mismatch_copy2: 1
 DMB_L1A[4:0]. More...
 
   unsigned   ddu_code_1: 4
 ALCT_DAV(1) More...
 
   unsigned   ddu_code_2: 4
 DMB_CRATE(8) More...
 
   unsigned   ddu_code_3: 4
 ALCT_DAV(1) More...
 
   unsigned   ddu_code_4: 4
 DMB-CFEB-Sync[3:0]. More...
 
   unsigned   dmb_bxn: 5
 constant, should be '1010' More...
 
   unsigned   dmb_bxn1: 12
 constant, should be 1001 More...
 
   unsigned   dmb_cfeb_sync: 4
 Fmt_Vers(1:0) More...
 
   unsigned   dmb_crate: 8
 DMB_ID(4) More...
 
   unsigned   dmb_id: 4
 constant, should be '1010' More...
 
   unsigned   dmb_l1a: 5
 constant, should be '1010' More...
 
   unsigned   dmb_l1a_hiwo: 12
 constant, should be 1001 More...
 
   unsigned   dmb_l1a_lowo: 12
 1st Header word More...
 
   unsigned   fmt_version: 2
 CLCT-DAV-Mismatch(1) More...
 
   unsigned   fmt_version_copy: 2
 CLCT-DAV-Mismatch(1) More...
 
   unsigned   fmt_version_copy2: 2
 CLCT-DAV-Mismatch(1) More...
 
   unsigned   newddu_code_1: 4
 DMB_L1A[11:0]. More...
 
   unsigned   newddu_code_2: 4
 DMB_L1A[23:12]. More...
 
   unsigned   newddu_code_3: 4
 ALCT_DAV(1) More...
 
   unsigned   newddu_code_4: 4
 DMB_BXN[11:0]. More...
 
   unsigned   tmb_dav: 1
 Fmt_Vers(1:0) More...
 
   unsigned   tmb_dav_copy: 1
 Fmt_Vers(1:0) More...
 
   unsigned   tmb_dav_copy2: 1
 CFEB_MOVLP(5:1) More...
 
bits
 

Detailed Description

Definition at line 44 of file CSCDMBHeader2013.h.

Constructor & Destructor Documentation

CSCDMBHeader2013::CSCDMBHeader2013 ( )

Definition at line 5 of file CSCDMBHeader2013.cc.

References bits, data(), and sizeInWords().

6 {
7  bzero(data(), sizeInWords()*2);
8  bits.ddu_code_1 = bits.ddu_code_2 = bits.ddu_code_3 = bits.ddu_code_4 = 0xA;
9  bits.newddu_code_1 = bits.newddu_code_2 = bits.newddu_code_3 = bits.newddu_code_4 = 0x9;
10 }
struct CSCDMBHeader2013::@424 bits
unsigned sizeInWords() const override
unsigned short * data() override
CSCDMBHeader2013::CSCDMBHeader2013 ( const uint16_t *  buf)

Definition at line 12 of file CSCDMBHeader2013.cc.

References data(), and sizeInWords().

13 {
14  memcpy(data(), buf, sizeInWords()*2);
15 }
unsigned sizeInWords() const override
unsigned short * data() override

Member Function Documentation

unsigned CSCDMBHeader2013::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

30 {
31  return bits.clct_dav_mismatch;
32 }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 123 of file CSCDMBHeader2013.cc.

References bits.

124 {
125  assert(icfeb < 7);
126  bits.cfeb_dav |= (1 << icfeb);
127  bits.cfeb_clct_sent |= (1 << icfeb);
128 }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 135 of file CSCDMBHeader2013.cc.

References bits.

136 {
137  bits.alct_dav = bits.alct_dav_copy = bits.alct_dav_copy2 = 1;
138 }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 130 of file CSCDMBHeader2013.cc.

References bits.

131 {
132  bits.tmb_dav = bits.tmb_dav_copy = bits.tmb_dav_copy2 = 1;
133 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

67 {
68  return bits.dmb_bxn;
69 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 71 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

72 {
73  return bits.dmb_bxn1;
74 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 68 of file CSCDMBHeader2013.h.

References activeDavMismatch(), bits, bxn(), bxn12(), cfebAvailable(), cfebMovlp(), check(), crateID(), dmbCfebSync(), dmbID(), format_version(), l1a(), l1a24(), nalct(), nclct(), and sizeInWords().

68 { return bits.cfeb_clct_sent; }
struct CSCDMBHeader2013::@424 bits
bool CSCDMBHeader2013::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 117 of file CSCDMBHeader2013.cc.

References cfebAvailable().

118 {
119  assert (icfeb < 7);
120  return (cfebAvailable() >> icfeb) & 1;
121 }
unsigned cfebAvailable() const override
unsigned CSCDMBHeader2013::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 40 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive(), and cfebAvailable().

41 {
42  return bits.cfeb_dav;
43 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

19 {
20  return bits.cfeb_movlp;
21 }
struct CSCDMBHeader2013::@424 bits
bool CSCDMBHeader2013::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 141 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

142 {
143  return (bits.ddu_code_1==0xA && bits.ddu_code_2==0xA &&
144  bits.ddu_code_3==0xA && bits.ddu_code_4==0xA &&
145  bits.newddu_code_1==0x9 && bits.newddu_code_2==0x9 &&
146  bits.newddu_code_3==0x9 && bits.newddu_code_4==0x9);
147 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

57 {
58  return bits.dmb_crate;
59 }
struct CSCDMBHeader2013::@424 bits
unsigned short* CSCDMBHeader2013::data ( )
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 87 of file CSCDMBHeader2013.h.

References bits.

Referenced by CSCDMBHeader2013().

87 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2013::@424 bits
unsigned short* CSCDMBHeader2013::data ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 88 of file CSCDMBHeader2013.h.

References bits.

88 { return (unsigned short *)(&bits);}
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

25 {
26  return bits.dmb_cfeb_sync;
27 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 61 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

62 {
63  return bits.dmb_id;
64 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::format_version ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

35 {
36  return bits.fmt_version;
37 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 76 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

77 {
78  return bits.dmb_l1a;
79 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 81 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

82 {
83  return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)) ;
84 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

47 {
48  return bits.alct_dav;
49 }
struct CSCDMBHeader2013::@424 bits
unsigned CSCDMBHeader2013::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebActive().

52 {
53  return bits.tmb_dav;
54 }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 98 of file CSCDMBHeader2013.cc.

References bits.

99 {
100  bits.dmb_bxn1 = bxn & 0xFFF;
101  bits.dmb_bxn = bxn & 0x1F;
102 }
struct CSCDMBHeader2013::@424 bits
unsigned bxn() const override
void CSCDMBHeader2013::setCrateAddress ( int  crate,
int  dmbId 
)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 105 of file CSCDMBHeader2013.cc.

References bits.

106 {
107  this->bits.dmb_crate = crate;
108  this->bits.dmb_id = dmbId;
109 }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::setdmbID ( int  newDMBID)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 65 of file CSCDMBHeader2013.h.

References bits.

65 { bits.dmb_id = newDMBID; }
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::setdmbVersion ( unsigned int  version)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2013.h.

References bits.

66 {bits.fmt_version = (version<4) ? version: 0;}
struct CSCDMBHeader2013::@424 bits
void CSCDMBHeader2013::setL1A ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 86 of file CSCDMBHeader2013.cc.

References bits.

87 {
88  bits.dmb_l1a = l1a & 0x1F;
89 }
struct CSCDMBHeader2013::@424 bits
unsigned l1a() const override
void CSCDMBHeader2013::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 91 of file CSCDMBHeader2013.cc.

References bits.

92 {
93  bits.dmb_l1a_lowo = l1a & 0xFFF;
94  bits.dmb_l1a_hiwo = (l1a>>12) & 0xFFF;
95 }
struct CSCDMBHeader2013::@424 bits
unsigned l1a() const override
unsigned CSCDMBHeader2013::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 111 of file CSCDMBHeader2013.cc.

Referenced by cfebActive(), and CSCDMBHeader2013().

112 {
113  return 8;
114 }

Member Data Documentation

unsigned CSCDMBHeader2013::alct_dav

TMB_DAV(1)

Definition at line 109 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::alct_dav_copy

TMB_DAV(1)

Definition at line 121 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::alct_dav_copy2

TMB_DAV(1)

Definition at line 136 of file CSCDMBHeader2013.h.

struct { ... } CSCDMBHeader2013::bits
unsigned CSCDMBHeader2013::cfeb_clct_sent

constant, should be 1001

3rd Header word

Definition at line 105 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::cfeb_dav

constant, should be 1001

5th Header word

Definition at line 117 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::cfeb_movlp

DMB_BXN[4:0] the time sample for this event has multiple overlaps with samples from previous events

Definition at line 134 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::clct_dav_mismatch

CFEB_CLCT_SENT(7:1)

Definition at line 106 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy

CFEB_DAV(7:1)

Definition at line 118 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy2

DMB_L1A[4:0].

Definition at line 141 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_1

ALCT_DAV(1)

Definition at line 122 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_2

DMB_CRATE(8)

Definition at line 127 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_3

ALCT_DAV(1)

Definition at line 137 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_4

DMB-CFEB-Sync[3:0].

Definition at line 144 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_bxn

constant, should be '1010'

7th Header word

Definition at line 131 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_bxn1

constant, should be 1001

4th Header word

Definition at line 113 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_cfeb_sync

Fmt_Vers(1:0)

Definition at line 143 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_crate

DMB_ID(4)

Definition at line 126 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_id

constant, should be '1010'

6th Header word

Definition at line 125 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a

constant, should be '1010'

8th Header word

Definition at line 140 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a_hiwo

constant, should be 1001

2nd Header word

Definition at line 101 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a_lowo

1st Header word

Definition at line 97 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version

CLCT-DAV-Mismatch(1)

Definition at line 107 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version_copy

CLCT-DAV-Mismatch(1)

Definition at line 119 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version_copy2

CLCT-DAV-Mismatch(1)

Definition at line 142 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_1

DMB_L1A[11:0].

Definition at line 98 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_2

DMB_L1A[23:12].

Definition at line 102 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_3

ALCT_DAV(1)

Definition at line 110 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_4

DMB_BXN[11:0].

Definition at line 114 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav

Fmt_Vers(1:0)

Definition at line 108 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav_copy

Fmt_Vers(1:0)

Definition at line 120 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav_copy2

CFEB_MOVLP(5:1)

Definition at line 135 of file CSCDMBHeader2013.h.