CMS 3D CMS Logo

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

#include <CSCDMBHeader2005.h>

Inheritance diagram for CSCDMBHeader2005:
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
 
 CSCDMBHeader2005 ()
 
 CSCDMBHeader2005 (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   active_dav_mismatch: 1
 
   unsigned   active_dav_mismatch_2: 1
 
   unsigned   active_dav_mismatch_3: 1
 
   unsigned   alct_dav_1: 1
 
   unsigned   alct_dav_2: 1
 
   unsigned   alct_dav_4: 1
 
   unsigned   cfeb_active: 5
 
   unsigned   cfeb_dav: 5
 5th Header word More...
 
   unsigned   cfeb_dav_1: 5
 3rd Header word More...
 
   unsigned   cfeb_movlp: 5
 
   unsigned   ddu_code_1: 4
 constant, should be '1010' More...
 
   unsigned   ddu_code_2: 4
 constant, should be '1010' More...
 
   unsigned   ddu_code_3: 4
 constant, should be '1010' More...
 
   unsigned   ddu_code_4: 4
 constant, should be '1010' More...
 
   unsigned   dmb_bxn: 7
 7th Header word More...
 
   unsigned   dmb_bxn1: 12
 4th Header word More...
 
   unsigned   dmb_cfeb_sync: 4
 
   unsigned   dmb_crate: 8
 
   unsigned   dmb_id: 4
 6th Header word More...
 
   unsigned   dmb_l1a: 8
 8th Header word More...
 
   unsigned   dmb_l1a_hiwo: 12
 2nd Header word More...
 
   unsigned   dmb_l1a_lowo: 12
 1st Header word More...
 
   unsigned   newddu_code_1: 4
 constant, should be 1001 More...
 
   unsigned   newddu_code_2: 4
 constant, should be 1001 More...
 
   unsigned   newddu_code_3: 4
 constant, should be 1001 More...
 
   unsigned   newddu_code_4: 4
 constant, should be 1001 More...
 
   unsigned   tmb_dav_1: 1
 
   unsigned   tmb_dav_2: 1
 
   unsigned   tmb_dav_4: 1
 
bits
 

Detailed Description

Definition at line 10 of file CSCDMBHeader2005.h.

Constructor & Destructor Documentation

CSCDMBHeader2005::CSCDMBHeader2005 ( )

Definition at line 5 of file CSCDMBHeader2005.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 CSCDMBHeader2005::@375 bits
unsigned short * data() override
unsigned sizeInWords() const override
CSCDMBHeader2005::CSCDMBHeader2005 ( const uint16_t *  buf)

Definition at line 12 of file CSCDMBHeader2005.cc.

References data(), and sizeInWords().

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

Member Function Documentation

unsigned CSCDMBHeader2005::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

30 {
31  return bits.active_dav_mismatch;
32 }
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 127 of file CSCDMBHeader2005.cc.

References bits.

128 {
129  assert(icfeb < 5);
130  bits.cfeb_dav |= (1 << icfeb);
131  bits.cfeb_active |= (1 << icfeb);
132 }
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 139 of file CSCDMBHeader2005.cc.

References bits.

140 {
141  bits.alct_dav_1 = bits.alct_dav_2 = bits.alct_dav_4 = 1;
142 }
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 134 of file CSCDMBHeader2005.cc.

References bits.

135 {
136  bits.tmb_dav_1 = bits.tmb_dav_2 = bits.tmb_dav_4 = 1;
137 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 61 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

62 {
63  return bits.dmb_bxn;
64 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

67 {
68  return bits.dmb_bxn1;
69 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.h.

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

34 {return bits.cfeb_active;}
struct CSCDMBHeader2005::@375 bits
bool CSCDMBHeader2005::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 116 of file CSCDMBHeader2005.cc.

References cfebAvailable().

117 {
118  assert (icfeb < 5);
119  return (cfebAvailable() >> icfeb) & 1;
120 }
unsigned cfebAvailable() const override
unsigned CSCDMBHeader2005::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 35 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive(), and cfebAvailable().

36 {
37  return bits.cfeb_dav;
38 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

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

Implements CSCVDMBHeaderFormat.

Definition at line 145 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

146 {
147  return (bits.ddu_code_1==0xA && bits.ddu_code_2==0xA &&
148  bits.ddu_code_3==0xA && bits.ddu_code_4==0xA &&
149  bits.newddu_code_1==0x9 && bits.newddu_code_2==0x9 &&
150  bits.newddu_code_3==0x9 && bits.newddu_code_4==0x9);
151 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

52 {
53  return bits.dmb_crate;
54 }
struct CSCDMBHeader2005::@375 bits
unsigned short* CSCDMBHeader2005::data ( )
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 53 of file CSCDMBHeader2005.h.

References bits.

Referenced by CSCDMBHeader2005().

53 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2005::@375 bits
unsigned short* CSCDMBHeader2005::data ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 54 of file CSCDMBHeader2005.h.

References bits.

54 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

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

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

57 {
58  return bits.dmb_id;
59 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::format_version ( ) const
overridevirtual
unsigned CSCDMBHeader2005::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 74 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive(), and setL1A().

75 {
76  return bits.dmb_l1a;
77 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 79 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

80 {
81  return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)) ;
82 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 41 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

42 {
43  return bits.alct_dav_1;
44 }
struct CSCDMBHeader2005::@375 bits
unsigned CSCDMBHeader2005::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebActive().

47 {
48  return bits.tmb_dav_1;
49 }
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 97 of file CSCDMBHeader2005.cc.

References bits.

98 {
99  bits.dmb_bxn = bxn & 0x3F;
100  bits.dmb_bxn1 = bxn & 0xFFF;
101 }
struct CSCDMBHeader2005::@375 bits
unsigned bxn() const override
void CSCDMBHeader2005::setCrateAddress ( int  crate,
int  dmbId 
)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 104 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 31 of file CSCDMBHeader2005.h.

References bits.

31 {bits.dmb_id = newDMBID;}
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::setdmbVersion ( unsigned int  version)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 32 of file CSCDMBHeader2005.h.

32 {}
void CSCDMBHeader2005::setL1A ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 85 of file CSCDMBHeader2005.cc.

References bits, and l1a().

86 {
87  bits.dmb_l1a = l1a;
88 }
unsigned l1a() const override
struct CSCDMBHeader2005::@375 bits
void CSCDMBHeader2005::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 90 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 110 of file CSCDMBHeader2005.cc.

Referenced by cfebActive(), and CSCDMBHeader2005().

111 {
112  return 8;
113 }

Member Data Documentation

unsigned CSCDMBHeader2005::active_dav_mismatch

Definition at line 90 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::active_dav_mismatch_2

Definition at line 92 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::active_dav_mismatch_3

Definition at line 94 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_1

Definition at line 89 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_2

Definition at line 93 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_4

Definition at line 76 of file CSCDMBHeader2005.h.

struct { ... } CSCDMBHeader2005::bits
unsigned CSCDMBHeader2005::cfeb_active

Definition at line 75 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_dav

5th Header word

Definition at line 88 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_dav_1

3rd Header word

Definition at line 74 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_movlp

the time sample for this event has multiple overlaps with samples from previous events

Definition at line 109 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_1

constant, should be '1010'

Definition at line 97 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_2

constant, should be '1010'

Definition at line 103 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_3

constant, should be '1010'

Definition at line 111 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_4

constant, should be '1010'

Definition at line 117 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_bxn

7th Header word

Definition at line 106 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_bxn1

4th Header word

Definition at line 83 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_cfeb_sync

Definition at line 115 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_crate

Definition at line 101 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_id

6th Header word

Definition at line 100 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a

8th Header word

Definition at line 114 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a_hiwo

2nd Header word

Definition at line 69 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a_lowo

1st Header word

Definition at line 64 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_1

constant, should be 1001

Definition at line 66 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_2

constant, should be 1001

Definition at line 71 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_3

constant, should be 1001

Definition at line 79 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_4

constant, should be 1001

Definition at line 85 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_1

Definition at line 91 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_2

Definition at line 95 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_4

Definition at line 77 of file CSCDMBHeader2005.h.