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
 
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
 
 CSCDMBHeader2005 ()
 
 CSCDMBHeader2005 (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   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() [1/2]

CSCDMBHeader2005::CSCDMBHeader2005 ( )

Definition at line 4 of file CSCDMBHeader2005.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().

◆ CSCDMBHeader2005() [2/2]

CSCDMBHeader2005::CSCDMBHeader2005 ( const uint16_t *  buf)

Definition at line 10 of file CSCDMBHeader2005.cc.

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

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

Member Function Documentation

◆ activeDavMismatch()

unsigned CSCDMBHeader2005::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 16 of file CSCDMBHeader2005.cc.

16 { return bits.active_dav_mismatch; }

References bits.

◆ addCFEB()

void CSCDMBHeader2005::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 63 of file CSCDMBHeader2005.cc.

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

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

◆ addNALCT()

void CSCDMBHeader2005::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 71 of file CSCDMBHeader2005.cc.

71 { bits.alct_dav_1 = bits.alct_dav_2 = bits.alct_dav_4 = 1; }

References bits.

◆ addNCLCT()

void CSCDMBHeader2005::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 69 of file CSCDMBHeader2005.cc.

69 { bits.tmb_dav_1 = bits.tmb_dav_2 = bits.tmb_dav_4 = 1; }

References bits.

◆ bxn()

unsigned CSCDMBHeader2005::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 28 of file CSCDMBHeader2005.cc.

28 { return bits.dmb_bxn; }

References bits.

Referenced by setBXN().

◆ bxn12()

unsigned CSCDMBHeader2005::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 30 of file CSCDMBHeader2005.cc.

30 { return bits.dmb_bxn1; }

References bits.

◆ cfebActive()

unsigned CSCDMBHeader2005::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.h.

34 { return bits.cfeb_active; }

References bits.

◆ cfebAvailable() [1/2]

unsigned CSCDMBHeader2005::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2005.cc.

18 { return bits.cfeb_dav; }

References bits.

Referenced by cfebAvailable().

◆ cfebAvailable() [2/2]

bool CSCDMBHeader2005::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2005.cc.

56  {
57  assert(icfeb < 5);
58  return (cfebAvailable() >> icfeb) & 1;
59 }

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

◆ cfebMovlp()

unsigned CSCDMBHeader2005::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 12 of file CSCDMBHeader2005.cc.

12 { return bits.cfeb_movlp; }

References bits.

◆ check()

bool CSCDMBHeader2005::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 73 of file CSCDMBHeader2005.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 CSCDMBHeader2005::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2005.cc.

24 { return bits.dmb_crate; }

References bits.

◆ data() [1/2]

unsigned short* CSCDMBHeader2005::data ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 54 of file CSCDMBHeader2005.h.

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

References bits.

◆ data() [2/2]

unsigned short* CSCDMBHeader2005::data ( )
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 53 of file CSCDMBHeader2005.h.

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

References bits.

Referenced by CSCDMBHeader2005().

◆ dmbCfebSync()

unsigned CSCDMBHeader2005::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 14 of file CSCDMBHeader2005.cc.

14 { return bits.dmb_cfeb_sync; }

References bits.

◆ dmbID()

unsigned CSCDMBHeader2005::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 26 of file CSCDMBHeader2005.cc.

26 { return bits.dmb_id; }

References bits.

◆ format_version()

unsigned CSCDMBHeader2005::format_version ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 61 of file CSCDMBHeader2005.cc.

61 { return 0; }

◆ l1a()

unsigned CSCDMBHeader2005::l1a ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 32 of file CSCDMBHeader2005.cc.

32 { return bits.dmb_l1a; }

References bits.

Referenced by setL1A(), and setL1A24().

◆ l1a24()

unsigned CSCDMBHeader2005::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.cc.

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

References bits.

◆ nalct()

unsigned CSCDMBHeader2005::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 20 of file CSCDMBHeader2005.cc.

20 { return bits.alct_dav_1; }

References bits.

◆ nclct()

unsigned CSCDMBHeader2005::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 22 of file CSCDMBHeader2005.cc.

22 { return bits.tmb_dav_1; }

References bits.

◆ setBXN()

void CSCDMBHeader2005::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 43 of file CSCDMBHeader2005.cc.

43  {
44  bits.dmb_bxn = bxn & 0x3F;
45  bits.dmb_bxn1 = bxn & 0xFFF;
46 }

References bits, and bxn().

◆ setCrateAddress()

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

Implements CSCVDMBHeaderFormat.

Definition at line 48 of file CSCDMBHeader2005.cc.

48  {
49  this->bits.dmb_crate = crate;
50  this->bits.dmb_id = dmbId;
51 }

References bits.

◆ setdmbID()

void CSCDMBHeader2005::setdmbID ( int  newDMBID)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 31 of file CSCDMBHeader2005.h.

31 { bits.dmb_id = newDMBID; }

References bits.

◆ setdmbVersion()

void CSCDMBHeader2005::setdmbVersion ( unsigned int  version)
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 32 of file CSCDMBHeader2005.h.

32 {}

◆ setL1A()

void CSCDMBHeader2005::setL1A ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 36 of file CSCDMBHeader2005.cc.

36 { bits.dmb_l1a = l1a; }

References bits, and l1a().

◆ setL1A24()

void CSCDMBHeader2005::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 38 of file CSCDMBHeader2005.cc.

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

References bits, and l1a().

◆ sizeInWords()

unsigned CSCDMBHeader2005::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 53 of file CSCDMBHeader2005.cc.

53 { return 8; }

Referenced by CSCDMBHeader2005().

Member Data Documentation

◆ active_dav_mismatch

unsigned CSCDMBHeader2005::active_dav_mismatch

Definition at line 87 of file CSCDMBHeader2005.h.

◆ active_dav_mismatch_2

unsigned CSCDMBHeader2005::active_dav_mismatch_2

Definition at line 89 of file CSCDMBHeader2005.h.

◆ active_dav_mismatch_3

unsigned CSCDMBHeader2005::active_dav_mismatch_3

Definition at line 91 of file CSCDMBHeader2005.h.

◆ alct_dav_1

unsigned CSCDMBHeader2005::alct_dav_1

Definition at line 86 of file CSCDMBHeader2005.h.

◆ alct_dav_2

unsigned CSCDMBHeader2005::alct_dav_2

Definition at line 90 of file CSCDMBHeader2005.h.

◆ alct_dav_4

unsigned CSCDMBHeader2005::alct_dav_4

Definition at line 74 of file CSCDMBHeader2005.h.

◆ bits

struct { ... } CSCDMBHeader2005::bits

◆ cfeb_active

unsigned CSCDMBHeader2005::cfeb_active

Definition at line 73 of file CSCDMBHeader2005.h.

◆ cfeb_dav

unsigned CSCDMBHeader2005::cfeb_dav

5th Header word

Definition at line 85 of file CSCDMBHeader2005.h.

◆ cfeb_dav_1

unsigned CSCDMBHeader2005::cfeb_dav_1

3rd Header word

Definition at line 72 of file CSCDMBHeader2005.h.

◆ cfeb_movlp

unsigned CSCDMBHeader2005::cfeb_movlp

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

Definition at line 106 of file CSCDMBHeader2005.h.

◆ ddu_code_1

unsigned CSCDMBHeader2005::ddu_code_1

constant, should be '1010'

Definition at line 94 of file CSCDMBHeader2005.h.

◆ ddu_code_2

unsigned CSCDMBHeader2005::ddu_code_2

constant, should be '1010'

Definition at line 100 of file CSCDMBHeader2005.h.

◆ ddu_code_3

unsigned CSCDMBHeader2005::ddu_code_3

constant, should be '1010'

Definition at line 108 of file CSCDMBHeader2005.h.

◆ ddu_code_4

unsigned CSCDMBHeader2005::ddu_code_4

constant, should be '1010'

Definition at line 114 of file CSCDMBHeader2005.h.

◆ dmb_bxn

unsigned CSCDMBHeader2005::dmb_bxn

7th Header word

Definition at line 103 of file CSCDMBHeader2005.h.

◆ dmb_bxn1

unsigned CSCDMBHeader2005::dmb_bxn1

4th Header word

Definition at line 80 of file CSCDMBHeader2005.h.

◆ dmb_cfeb_sync

unsigned CSCDMBHeader2005::dmb_cfeb_sync

Definition at line 112 of file CSCDMBHeader2005.h.

◆ dmb_crate

unsigned CSCDMBHeader2005::dmb_crate

Definition at line 98 of file CSCDMBHeader2005.h.

◆ dmb_id

unsigned CSCDMBHeader2005::dmb_id

6th Header word

Definition at line 97 of file CSCDMBHeader2005.h.

◆ dmb_l1a

unsigned CSCDMBHeader2005::dmb_l1a

8th Header word

Definition at line 111 of file CSCDMBHeader2005.h.

◆ dmb_l1a_hiwo

unsigned CSCDMBHeader2005::dmb_l1a_hiwo

2nd Header word

Definition at line 67 of file CSCDMBHeader2005.h.

◆ dmb_l1a_lowo

unsigned CSCDMBHeader2005::dmb_l1a_lowo

1st Header word

Definition at line 62 of file CSCDMBHeader2005.h.

◆ newddu_code_1

unsigned CSCDMBHeader2005::newddu_code_1

constant, should be 1001

Definition at line 64 of file CSCDMBHeader2005.h.

◆ newddu_code_2

unsigned CSCDMBHeader2005::newddu_code_2

constant, should be 1001

Definition at line 69 of file CSCDMBHeader2005.h.

◆ newddu_code_3

unsigned CSCDMBHeader2005::newddu_code_3

constant, should be 1001

Definition at line 77 of file CSCDMBHeader2005.h.

◆ newddu_code_4

unsigned CSCDMBHeader2005::newddu_code_4

constant, should be 1001

Definition at line 82 of file CSCDMBHeader2005.h.

◆ tmb_dav_1

unsigned CSCDMBHeader2005::tmb_dav_1

Definition at line 88 of file CSCDMBHeader2005.h.

◆ tmb_dav_2

unsigned CSCDMBHeader2005::tmb_dav_2

Definition at line 92 of file CSCDMBHeader2005.h.

◆ tmb_dav_4

unsigned CSCDMBHeader2005::tmb_dav_4

Definition at line 75 of file CSCDMBHeader2005.h.

CSCDMBHeader2005::cfebAvailable
unsigned cfebAvailable() const override
Definition: CSCDMBHeader2005.cc:18
cms::cuda::assert
assert(be >=bs)
CSCDMBHeader2005::bxn
unsigned bxn() const override
Definition: CSCDMBHeader2005.cc:28
CSCDMBHeader2005::l1a
unsigned l1a() const override
Definition: CSCDMBHeader2005.cc:32
CSCDMBHeader2005::data
unsigned short * data() override
Definition: CSCDMBHeader2005.h:53
CSCDMBHeader2005::bits
struct CSCDMBHeader2005::@471 bits
visDQMUpload.buf
buf
Definition: visDQMUpload.py:160
CSCDMBHeader2005::sizeInWords
unsigned sizeInWords() const override
Definition: CSCDMBHeader2005.cc:53