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
 
unsigned cfebAvailable () const override
 
bool cfebAvailable (unsigned icfeb) override
 counts from zero More...
 
unsigned cfebMovlp () const override
 
bool check () const override
 
unsigned crateID () const override
 
 CSCDMBHeader2013 ()
 
 CSCDMBHeader2013 (const uint16_t *buf)
 
unsigned short * data () const override
 
unsigned short * data () 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.

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 }

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

◆ CSCDMBHeader2013() [2/2]

CSCDMBHeader2013::CSCDMBHeader2013 ( const uint16_t *  buf)

Definition at line 11 of file CSCDMBHeader2013.cc.

11 { memcpy(data(), buf, sizeInWords() * 2); }

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

Member Function Documentation

◆ activeDavMismatch()

unsigned CSCDMBHeader2013::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 17 of file CSCDMBHeader2013.cc.

17 { return bits.clct_dav_mismatch; }

References bits.

◆ addCFEB()

void CSCDMBHeader2013::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 64 of file CSCDMBHeader2013.cc.

64  {
66  bits.cfeb_dav |= (1 << icfeb);
67  bits.cfeb_clct_sent |= (1 << icfeb);
68 }

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

◆ addNALCT()

void CSCDMBHeader2013::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 72 of file CSCDMBHeader2013.cc.

72 { bits.alct_dav = bits.alct_dav_copy = bits.alct_dav_copy2 = 1; }

References bits.

◆ addNCLCT()

void CSCDMBHeader2013::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 70 of file CSCDMBHeader2013.cc.

70 { bits.tmb_dav = bits.tmb_dav_copy = bits.tmb_dav_copy2 = 1; }

References bits.

◆ bxn()

unsigned CSCDMBHeader2013::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 31 of file CSCDMBHeader2013.cc.

31 { return bits.dmb_bxn; }

References bits.

Referenced by setBXN().

◆ bxn12()

unsigned CSCDMBHeader2013::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 33 of file CSCDMBHeader2013.cc.

33 { return bits.dmb_bxn1; }

References bits.

◆ cfebActive()

unsigned CSCDMBHeader2013::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 67 of file CSCDMBHeader2013.h.

67 { return bits.cfeb_clct_sent; }

References bits.

◆ cfebAvailable() [1/2]

unsigned CSCDMBHeader2013::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 21 of file CSCDMBHeader2013.cc.

21 { return bits.cfeb_dav; }

References bits.

Referenced by cfebAvailable().

◆ cfebAvailable() [2/2]

bool CSCDMBHeader2013::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 59 of file CSCDMBHeader2013.cc.

59  {
61  return (cfebAvailable() >> icfeb) & 1;
62 }

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

◆ cfebMovlp()

unsigned CSCDMBHeader2013::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 13 of file CSCDMBHeader2013.cc.

13 { return bits.cfeb_movlp; }

References bits.

◆ check()

bool CSCDMBHeader2013::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 74 of file CSCDMBHeader2013.cc.

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 }

References bits.

◆ crateID()

unsigned CSCDMBHeader2013::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 27 of file CSCDMBHeader2013.cc.

27 { return bits.dmb_crate; }

References bits.

◆ data() [1/2]

unsigned short* CSCDMBHeader2013::data ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 87 of file CSCDMBHeader2013.h.

87 { return (unsigned short *)(&bits); }

References bits.

◆ data() [2/2]

unsigned short* CSCDMBHeader2013::data ( )
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 86 of file CSCDMBHeader2013.h.

86 { return (unsigned short *)(&bits); }

References bits.

Referenced by CSCDMBHeader2013().

◆ dmbCfebSync()

unsigned CSCDMBHeader2013::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 15 of file CSCDMBHeader2013.cc.

15 { return bits.dmb_cfeb_sync; }

References bits.

◆ dmbID()

unsigned CSCDMBHeader2013::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2013.cc.

29 { return bits.dmb_id; }

References bits.

◆ format_version()

unsigned CSCDMBHeader2013::format_version ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 19 of file CSCDMBHeader2013.cc.

19 { return bits.fmt_version; }

References bits.

◆ l1a()

unsigned CSCDMBHeader2013::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 35 of file CSCDMBHeader2013.cc.

35 { return bits.dmb_l1a; }

References bits.

Referenced by setL1A(), and setL1A24().

◆ l1a24()

unsigned CSCDMBHeader2013::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 37 of file CSCDMBHeader2013.cc.

37 { return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)); }

References bits.

◆ nalct()

unsigned CSCDMBHeader2013::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 23 of file CSCDMBHeader2013.cc.

23 { return bits.alct_dav; }

References bits.

◆ nclct()

unsigned CSCDMBHeader2013::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 25 of file CSCDMBHeader2013.cc.

25 { return bits.tmb_dav; }

References bits.

◆ setBXN()

void CSCDMBHeader2013::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2013.cc.

46  {
47  bits.dmb_bxn1 = bxn & 0xFFF;
48  bits.dmb_bxn = bxn & 0x1F;
49 }

References bits, and bxn().

◆ setCrateAddress()

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

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2013.cc.

51  {
52  this->bits.dmb_crate = crate;
53  this->bits.dmb_id = dmbId;
54 }

References bits.

◆ setdmbID()

void CSCDMBHeader2013::setdmbID ( int  newDMBID)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 64 of file CSCDMBHeader2013.h.

64 { bits.dmb_id = newDMBID; }

References bits.

◆ setdmbVersion()

void CSCDMBHeader2013::setdmbVersion ( unsigned int  version)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 65 of file CSCDMBHeader2013.h.

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

References bits, and BeamSplash_cfg::version.

◆ setL1A()

void CSCDMBHeader2013::setL1A ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 39 of file CSCDMBHeader2013.cc.

39 { bits.dmb_l1a = l1a & 0x1F; }

References bits, and l1a().

◆ setL1A24()

void CSCDMBHeader2013::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 41 of file CSCDMBHeader2013.cc.

41  {
42  bits.dmb_l1a_lowo = l1a & 0xFFF;
43  bits.dmb_l1a_hiwo = (l1a >> 12) & 0xFFF;
44 }

References bits, and l1a().

◆ sizeInWords()

unsigned CSCDMBHeader2013::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2013.cc.

56 { return 8; }

Referenced by CSCDMBHeader2013().

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.

CSCDMBHeader2013::cfebAvailable
unsigned cfebAvailable() const override
Definition: CSCDMBHeader2013.cc:21
CSCDMBHeader2013::bxn
unsigned bxn() const override
Definition: CSCDMBHeader2013.cc:31
cms::cuda::assert
assert(be >=bs)
CSCDMBHeader2013::bits
struct CSCDMBHeader2013::@472 bits
CSCDMBHeader2013::sizeInWords
unsigned sizeInWords() const override
Definition: CSCDMBHeader2013.cc:56
CSCDMBHeader2013::l1a
unsigned l1a() const override
Definition: CSCDMBHeader2013.cc:35
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
CSCConstants::MAX_CFEBS_RUN2
Definition: CSCConstants.h:24
CSCDMBHeader2013::data
unsigned short * data() override
Definition: CSCDMBHeader2013.h:86
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45