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 4 of file CSCDMBHeader2013.cc.

4  {
5  bzero(data(), sizeInWords() * 2);
6  bits.ddu_code_1 = bits.ddu_code_2 = bits.ddu_code_3 = bits.ddu_code_4 = 0xA;
7  bits.newddu_code_1 = bits.newddu_code_2 = bits.newddu_code_3 = bits.newddu_code_4 = 0x9;
8 }

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

◆ CSCDMBHeader2013() [2/2]

CSCDMBHeader2013::CSCDMBHeader2013 ( const uint16_t *  buf)

Definition at line 10 of file CSCDMBHeader2013.cc.

10 { 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 16 of file CSCDMBHeader2013.cc.

16 { return bits.clct_dav_mismatch; }

References bits.

◆ addCFEB()

void CSCDMBHeader2013::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 63 of file CSCDMBHeader2013.cc.

63  {
64  assert(icfeb < 7);
65  bits.cfeb_dav |= (1 << icfeb);
66  bits.cfeb_clct_sent |= (1 << icfeb);
67 }

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

◆ addNALCT()

void CSCDMBHeader2013::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 71 of file CSCDMBHeader2013.cc.

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

References bits.

◆ addNCLCT()

void CSCDMBHeader2013::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 69 of file CSCDMBHeader2013.cc.

69 { 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 30 of file CSCDMBHeader2013.cc.

30 { return bits.dmb_bxn; }

References bits.

Referenced by setBXN().

◆ bxn12()

unsigned CSCDMBHeader2013::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 32 of file CSCDMBHeader2013.cc.

32 { 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 20 of file CSCDMBHeader2013.cc.

20 { 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 58 of file CSCDMBHeader2013.cc.

58  {
59  assert(icfeb < 7);
60  return (cfebAvailable() >> icfeb) & 1;
61 }

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

◆ cfebMovlp()

unsigned CSCDMBHeader2013::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 12 of file CSCDMBHeader2013.cc.

12 { return bits.cfeb_movlp; }

References bits.

◆ check()

bool CSCDMBHeader2013::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 73 of file CSCDMBHeader2013.cc.

73  {
74  return (bits.ddu_code_1 == 0xA && bits.ddu_code_2 == 0xA && bits.ddu_code_3 == 0xA && bits.ddu_code_4 == 0xA &&
75  bits.newddu_code_1 == 0x9 && bits.newddu_code_2 == 0x9 && bits.newddu_code_3 == 0x9 &&
76  bits.newddu_code_4 == 0x9);
77 }

References bits.

◆ crateID()

unsigned CSCDMBHeader2013::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 26 of file CSCDMBHeader2013.cc.

26 { 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 14 of file CSCDMBHeader2013.cc.

14 { return bits.dmb_cfeb_sync; }

References bits.

◆ dmbID()

unsigned CSCDMBHeader2013::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 28 of file CSCDMBHeader2013.cc.

28 { return bits.dmb_id; }

References bits.

◆ format_version()

unsigned CSCDMBHeader2013::format_version ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2013.cc.

18 { return bits.fmt_version; }

References bits.

◆ l1a()

unsigned CSCDMBHeader2013::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2013.cc.

34 { return bits.dmb_l1a; }

References bits.

Referenced by setL1A(), and setL1A24().

◆ l1a24()

unsigned CSCDMBHeader2013::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 36 of file CSCDMBHeader2013.cc.

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

References bits.

◆ nalct()

unsigned CSCDMBHeader2013::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 22 of file CSCDMBHeader2013.cc.

22 { return bits.alct_dav; }

References bits.

◆ nclct()

unsigned CSCDMBHeader2013::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2013.cc.

24 { return bits.tmb_dav; }

References bits.

◆ setBXN()

void CSCDMBHeader2013::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 45 of file CSCDMBHeader2013.cc.

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

References bits, and bxn().

◆ setCrateAddress()

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

Implements CSCVDMBHeaderFormat.

Definition at line 50 of file CSCDMBHeader2013.cc.

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

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 38 of file CSCDMBHeader2013.cc.

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

References bits, and l1a().

◆ setL1A24()

void CSCDMBHeader2013::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 40 of file CSCDMBHeader2013.cc.

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

References bits, and l1a().

◆ sizeInWords()

unsigned CSCDMBHeader2013::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 55 of file CSCDMBHeader2013.cc.

55 { 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:20
CSCDMBHeader2013::bits
struct CSCDMBHeader2013::@417 bits
CSCDMBHeader2013::bxn
unsigned bxn() const override
Definition: CSCDMBHeader2013.cc:30
cms::cuda::assert
assert(be >=bs)
CSCDMBHeader2013::sizeInWords
unsigned sizeInWords() const override
Definition: CSCDMBHeader2013.cc:55
CSCDMBHeader2013::l1a
unsigned l1a() const override
Definition: CSCDMBHeader2013.cc:34
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCDMBHeader2013::data
unsigned short * data() override
Definition: CSCDMBHeader2013.h:86
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45