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 43 of file CSCDMBHeader2013.h.

Constructor & Destructor Documentation

◆ CSCDMBHeader2013() [1/2]

CSCDMBHeader2013::CSCDMBHeader2013 ( )

Definition at line 5 of file CSCDMBHeader2013.cc.

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

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

◆ CSCDMBHeader2013() [2/2]

CSCDMBHeader2013::CSCDMBHeader2013 ( const uint16_t *  buf)

Definition at line 11 of file CSCDMBHeader2013.cc.

References visDQMUpload::buf, data(), and sizeInWords().

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

Member Function Documentation

◆ activeDavMismatch()

unsigned CSCDMBHeader2013::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 17 of file CSCDMBHeader2013.cc.

References bits.

17 { return bits.clct_dav_mismatch; }
struct CSCDMBHeader2013::@485 bits

◆ addCFEB()

void CSCDMBHeader2013::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 64 of file CSCDMBHeader2013.cc.

References cms::cuda::assert(), bits, and CSCConstants::MAX_CFEBS_RUN2.

64  {
66  bits.cfeb_dav |= (1 << icfeb);
67  bits.cfeb_clct_sent |= (1 << icfeb);
68 }
assert(be >=bs)
struct CSCDMBHeader2013::@485 bits

◆ addNALCT()

void CSCDMBHeader2013::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 72 of file CSCDMBHeader2013.cc.

References bits.

72 { bits.alct_dav = bits.alct_dav_copy = bits.alct_dav_copy2 = 1; }
struct CSCDMBHeader2013::@485 bits

◆ addNCLCT()

void CSCDMBHeader2013::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 70 of file CSCDMBHeader2013.cc.

References bits.

70 { bits.tmb_dav = bits.tmb_dav_copy = bits.tmb_dav_copy2 = 1; }
struct CSCDMBHeader2013::@485 bits

◆ bxn()

unsigned CSCDMBHeader2013::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 31 of file CSCDMBHeader2013.cc.

References bits.

Referenced by setBXN().

31 { return bits.dmb_bxn; }
struct CSCDMBHeader2013::@485 bits

◆ bxn12()

unsigned CSCDMBHeader2013::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 33 of file CSCDMBHeader2013.cc.

References bits.

33 { return bits.dmb_bxn1; }
struct CSCDMBHeader2013::@485 bits

◆ cfebActive()

unsigned CSCDMBHeader2013::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 67 of file CSCDMBHeader2013.h.

References bits.

67 { return bits.cfeb_clct_sent; }
struct CSCDMBHeader2013::@485 bits

◆ cfebAvailable() [1/2]

bool CSCDMBHeader2013::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 59 of file CSCDMBHeader2013.cc.

References cms::cuda::assert(), cfebAvailable(), and CSCConstants::MAX_CFEBS_RUN2.

59  {
61  return (cfebAvailable() >> icfeb) & 1;
62 }
unsigned cfebAvailable() const override
assert(be >=bs)

◆ cfebAvailable() [2/2]

unsigned CSCDMBHeader2013::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 21 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebAvailable().

21 { return bits.cfeb_dav; }
struct CSCDMBHeader2013::@485 bits

◆ cfebMovlp()

unsigned CSCDMBHeader2013::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 13 of file CSCDMBHeader2013.cc.

References bits.

13 { return bits.cfeb_movlp; }
struct CSCDMBHeader2013::@485 bits

◆ check()

bool CSCDMBHeader2013::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 74 of file CSCDMBHeader2013.cc.

References bits.

74  {
75  return (bits.ddu_code_1 == 0xA && bits.ddu_code_2 == 0xA && bits.ddu_code_3 == 0xA && bits.ddu_code_4 == 0xA &&
76  bits.newddu_code_1 == 0x9 && bits.newddu_code_2 == 0x9 && bits.newddu_code_3 == 0x9 &&
77  bits.newddu_code_4 == 0x9);
78 }
struct CSCDMBHeader2013::@485 bits

◆ crateID()

unsigned CSCDMBHeader2013::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 27 of file CSCDMBHeader2013.cc.

References bits.

27 { return bits.dmb_crate; }
struct CSCDMBHeader2013::@485 bits

◆ data() [1/2]

unsigned short* CSCDMBHeader2013::data ( )
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 86 of file CSCDMBHeader2013.h.

References bits.

Referenced by CSCDMBHeader2013().

86 { return (unsigned short *)(&bits); }
struct CSCDMBHeader2013::@485 bits

◆ data() [2/2]

unsigned short* CSCDMBHeader2013::data ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 87 of file CSCDMBHeader2013.h.

References bits.

87 { return (unsigned short *)(&bits); }
struct CSCDMBHeader2013::@485 bits

◆ dmbCfebSync()

unsigned CSCDMBHeader2013::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 15 of file CSCDMBHeader2013.cc.

References bits.

15 { return bits.dmb_cfeb_sync; }
struct CSCDMBHeader2013::@485 bits

◆ dmbID()

unsigned CSCDMBHeader2013::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2013.cc.

References bits.

29 { return bits.dmb_id; }
struct CSCDMBHeader2013::@485 bits

◆ format_version()

unsigned CSCDMBHeader2013::format_version ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 19 of file CSCDMBHeader2013.cc.

References bits.

19 { return bits.fmt_version; }
struct CSCDMBHeader2013::@485 bits

◆ l1a()

unsigned CSCDMBHeader2013::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 35 of file CSCDMBHeader2013.cc.

References bits.

Referenced by setL1A(), and setL1A24().

35 { return bits.dmb_l1a; }
struct CSCDMBHeader2013::@485 bits

◆ l1a24()

unsigned CSCDMBHeader2013::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 37 of file CSCDMBHeader2013.cc.

References bits.

37 { return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)); }
struct CSCDMBHeader2013::@485 bits

◆ nalct()

unsigned CSCDMBHeader2013::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 23 of file CSCDMBHeader2013.cc.

References bits.

23 { return bits.alct_dav; }
struct CSCDMBHeader2013::@485 bits

◆ nclct()

unsigned CSCDMBHeader2013::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 25 of file CSCDMBHeader2013.cc.

References bits.

25 { return bits.tmb_dav; }
struct CSCDMBHeader2013::@485 bits

◆ setBXN()

void CSCDMBHeader2013::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2013.cc.

References bits, and bxn().

46  {
47  bits.dmb_bxn1 = bxn & 0xFFF;
48  bits.dmb_bxn = bxn & 0x1F;
49 }
unsigned bxn() const override
struct CSCDMBHeader2013::@485 bits

◆ setCrateAddress()

void CSCDMBHeader2013::setCrateAddress ( int  crate,
int  dmbId 
)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2013.cc.

References bits.

51  {
52  this->bits.dmb_crate = crate;
53  this->bits.dmb_id = dmbId;
54 }
struct CSCDMBHeader2013::@485 bits

◆ setdmbID()

void CSCDMBHeader2013::setdmbID ( int  newDMBID)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 64 of file CSCDMBHeader2013.h.

References bits.

64 { bits.dmb_id = newDMBID; }
struct CSCDMBHeader2013::@485 bits

◆ setdmbVersion()

void CSCDMBHeader2013::setdmbVersion ( unsigned int  version)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 65 of file CSCDMBHeader2013.h.

References bits, and BeamSplash_cfg::version.

65 { bits.fmt_version = (version < 4) ? version : 0; }
struct CSCDMBHeader2013::@485 bits

◆ setL1A()

void CSCDMBHeader2013::setL1A ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 39 of file CSCDMBHeader2013.cc.

References bits, and l1a().

39 { bits.dmb_l1a = l1a & 0x1F; }
unsigned l1a() const override
struct CSCDMBHeader2013::@485 bits

◆ setL1A24()

void CSCDMBHeader2013::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 41 of file CSCDMBHeader2013.cc.

References bits, and l1a().

41  {
42  bits.dmb_l1a_lowo = l1a & 0xFFF;
43  bits.dmb_l1a_hiwo = (l1a >> 12) & 0xFFF;
44 }
unsigned l1a() const override
struct CSCDMBHeader2013::@485 bits

◆ sizeInWords()

unsigned CSCDMBHeader2013::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2013.cc.

Referenced by CSCDMBHeader2013().

56 { return 8; }

Member Data Documentation

◆ alct_dav

unsigned CSCDMBHeader2013::alct_dav

TMB_DAV(1)

Definition at line 107 of file CSCDMBHeader2013.h.

◆ alct_dav_copy

unsigned CSCDMBHeader2013::alct_dav_copy

TMB_DAV(1)

Definition at line 119 of file CSCDMBHeader2013.h.

◆ alct_dav_copy2

unsigned CSCDMBHeader2013::alct_dav_copy2

TMB_DAV(1)

Definition at line 133 of file CSCDMBHeader2013.h.

◆ bits

struct { ... } CSCDMBHeader2013::bits

◆ cfeb_clct_sent

unsigned CSCDMBHeader2013::cfeb_clct_sent

constant, should be 1001

3rd Header word

Definition at line 103 of file CSCDMBHeader2013.h.

◆ cfeb_dav

unsigned CSCDMBHeader2013::cfeb_dav

constant, should be 1001

5th Header word

Definition at line 115 of file CSCDMBHeader2013.h.

◆ cfeb_movlp

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 131 of file CSCDMBHeader2013.h.

◆ clct_dav_mismatch

unsigned CSCDMBHeader2013::clct_dav_mismatch

CFEB_CLCT_SENT(7:1)

Definition at line 104 of file CSCDMBHeader2013.h.

◆ clct_dav_mismatch_copy

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy

CFEB_DAV(7:1)

Definition at line 116 of file CSCDMBHeader2013.h.

◆ clct_dav_mismatch_copy2

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy2

DMB_L1A[4:0].

Definition at line 138 of file CSCDMBHeader2013.h.

◆ ddu_code_1

unsigned CSCDMBHeader2013::ddu_code_1

ALCT_DAV(1)

Definition at line 120 of file CSCDMBHeader2013.h.

◆ ddu_code_2

unsigned CSCDMBHeader2013::ddu_code_2

DMB_CRATE(8)

Definition at line 125 of file CSCDMBHeader2013.h.

◆ ddu_code_3

unsigned CSCDMBHeader2013::ddu_code_3

ALCT_DAV(1)

Definition at line 134 of file CSCDMBHeader2013.h.

◆ ddu_code_4

unsigned CSCDMBHeader2013::ddu_code_4

DMB-CFEB-Sync[3:0].

Definition at line 141 of file CSCDMBHeader2013.h.

◆ dmb_bxn

unsigned CSCDMBHeader2013::dmb_bxn

constant, should be '1010'

7th Header word

Definition at line 128 of file CSCDMBHeader2013.h.

◆ dmb_bxn1

unsigned CSCDMBHeader2013::dmb_bxn1

constant, should be 1001

4th Header word

Definition at line 111 of file CSCDMBHeader2013.h.

◆ dmb_cfeb_sync

unsigned CSCDMBHeader2013::dmb_cfeb_sync

Fmt_Vers(1:0)

Definition at line 140 of file CSCDMBHeader2013.h.

◆ dmb_crate

unsigned CSCDMBHeader2013::dmb_crate

DMB_ID(4)

Definition at line 124 of file CSCDMBHeader2013.h.

◆ dmb_id

unsigned CSCDMBHeader2013::dmb_id

constant, should be '1010'

6th Header word

Definition at line 123 of file CSCDMBHeader2013.h.

◆ dmb_l1a

unsigned CSCDMBHeader2013::dmb_l1a

constant, should be '1010'

8th Header word

Definition at line 137 of file CSCDMBHeader2013.h.

◆ dmb_l1a_hiwo

unsigned CSCDMBHeader2013::dmb_l1a_hiwo

constant, should be 1001

2nd Header word

Definition at line 99 of file CSCDMBHeader2013.h.

◆ dmb_l1a_lowo

unsigned CSCDMBHeader2013::dmb_l1a_lowo

1st Header word

Definition at line 95 of file CSCDMBHeader2013.h.

◆ fmt_version

unsigned CSCDMBHeader2013::fmt_version

CLCT-DAV-Mismatch(1)

Definition at line 105 of file CSCDMBHeader2013.h.

◆ fmt_version_copy

unsigned CSCDMBHeader2013::fmt_version_copy

CLCT-DAV-Mismatch(1)

Definition at line 117 of file CSCDMBHeader2013.h.

◆ fmt_version_copy2

unsigned CSCDMBHeader2013::fmt_version_copy2

CLCT-DAV-Mismatch(1)

Definition at line 139 of file CSCDMBHeader2013.h.

◆ newddu_code_1

unsigned CSCDMBHeader2013::newddu_code_1

DMB_L1A[11:0].

Definition at line 96 of file CSCDMBHeader2013.h.

◆ newddu_code_2

unsigned CSCDMBHeader2013::newddu_code_2

DMB_L1A[23:12].

Definition at line 100 of file CSCDMBHeader2013.h.

◆ newddu_code_3

unsigned CSCDMBHeader2013::newddu_code_3

ALCT_DAV(1)

Definition at line 108 of file CSCDMBHeader2013.h.

◆ newddu_code_4

unsigned CSCDMBHeader2013::newddu_code_4

DMB_BXN[11:0].

Definition at line 112 of file CSCDMBHeader2013.h.

◆ tmb_dav

unsigned CSCDMBHeader2013::tmb_dav

Fmt_Vers(1:0)

Definition at line 106 of file CSCDMBHeader2013.h.

◆ tmb_dav_copy

unsigned CSCDMBHeader2013::tmb_dav_copy

Fmt_Vers(1:0)

Definition at line 118 of file CSCDMBHeader2013.h.

◆ tmb_dav_copy2

unsigned CSCDMBHeader2013::tmb_dav_copy2

CFEB_MOVLP(5:1)

Definition at line 132 of file CSCDMBHeader2013.h.