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

CSCDMBHeader2005::CSCDMBHeader2005 ( )

Definition at line 4 of file CSCDMBHeader2005.cc.

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

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 }
struct CSCDMBHeader2005::@483 bits
unsigned short * data() override
unsigned sizeInWords() const override

◆ CSCDMBHeader2005() [2/2]

CSCDMBHeader2005::CSCDMBHeader2005 ( const uint16_t *  buf)

Definition at line 10 of file CSCDMBHeader2005.cc.

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

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

Member Function Documentation

◆ activeDavMismatch()

unsigned CSCDMBHeader2005::activeDavMismatch ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 16 of file CSCDMBHeader2005.cc.

References bits.

16 { return bits.active_dav_mismatch; }
struct CSCDMBHeader2005::@483 bits

◆ addCFEB()

void CSCDMBHeader2005::addCFEB ( int  icfeb)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 63 of file CSCDMBHeader2005.cc.

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

63  {
64  assert(icfeb < 5);
65  bits.cfeb_dav |= (1 << icfeb);
66  bits.cfeb_active |= (1 << icfeb);
67 }
struct CSCDMBHeader2005::@483 bits
assert(be >=bs)

◆ addNALCT()

void CSCDMBHeader2005::addNALCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 71 of file CSCDMBHeader2005.cc.

References bits.

71 { bits.alct_dav_1 = bits.alct_dav_2 = bits.alct_dav_4 = 1; }
struct CSCDMBHeader2005::@483 bits

◆ addNCLCT()

void CSCDMBHeader2005::addNCLCT ( )
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 69 of file CSCDMBHeader2005.cc.

References bits.

69 { bits.tmb_dav_1 = bits.tmb_dav_2 = bits.tmb_dav_4 = 1; }
struct CSCDMBHeader2005::@483 bits

◆ bxn()

unsigned CSCDMBHeader2005::bxn ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 28 of file CSCDMBHeader2005.cc.

References bits.

Referenced by setBXN().

28 { return bits.dmb_bxn; }
struct CSCDMBHeader2005::@483 bits

◆ bxn12()

unsigned CSCDMBHeader2005::bxn12 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 30 of file CSCDMBHeader2005.cc.

References bits.

30 { return bits.dmb_bxn1; }
struct CSCDMBHeader2005::@483 bits

◆ cfebActive()

unsigned CSCDMBHeader2005::cfebActive ( ) const
inlineoverridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.h.

References bits.

34 { return bits.cfeb_active; }
struct CSCDMBHeader2005::@483 bits

◆ cfebAvailable() [1/2]

bool CSCDMBHeader2005::cfebAvailable ( unsigned  icfeb)
overridevirtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2005.cc.

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

56  {
57  assert(icfeb < 5);
58  return (cfebAvailable() >> icfeb) & 1;
59 }
assert(be >=bs)
unsigned cfebAvailable() const override

◆ cfebAvailable() [2/2]

unsigned CSCDMBHeader2005::cfebAvailable ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebAvailable().

18 { return bits.cfeb_dav; }
struct CSCDMBHeader2005::@483 bits

◆ cfebMovlp()

unsigned CSCDMBHeader2005::cfebMovlp ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 12 of file CSCDMBHeader2005.cc.

References bits.

12 { return bits.cfeb_movlp; }
struct CSCDMBHeader2005::@483 bits

◆ check()

bool CSCDMBHeader2005::check ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 73 of file CSCDMBHeader2005.cc.

References bits.

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 }
struct CSCDMBHeader2005::@483 bits

◆ crateID()

unsigned CSCDMBHeader2005::crateID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2005.cc.

References bits.

24 { return bits.dmb_crate; }
struct CSCDMBHeader2005::@483 bits

◆ data() [1/2]

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::@483 bits

◆ data() [2/2]

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::@483 bits

◆ dmbCfebSync()

unsigned CSCDMBHeader2005::dmbCfebSync ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 14 of file CSCDMBHeader2005.cc.

References bits.

14 { return bits.dmb_cfeb_sync; }
struct CSCDMBHeader2005::@483 bits

◆ dmbID()

unsigned CSCDMBHeader2005::dmbID ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 26 of file CSCDMBHeader2005.cc.

References bits.

26 { return bits.dmb_id; }
struct CSCDMBHeader2005::@483 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.

References bits.

Referenced by setL1A(), and setL1A24().

32 { return bits.dmb_l1a; }
struct CSCDMBHeader2005::@483 bits

◆ l1a24()

unsigned CSCDMBHeader2005::l1a24 ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.cc.

References bits.

34 { return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)); }
struct CSCDMBHeader2005::@483 bits

◆ nalct()

unsigned CSCDMBHeader2005::nalct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 20 of file CSCDMBHeader2005.cc.

References bits.

20 { return bits.alct_dav_1; }
struct CSCDMBHeader2005::@483 bits

◆ nclct()

unsigned CSCDMBHeader2005::nclct ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 22 of file CSCDMBHeader2005.cc.

References bits.

22 { return bits.tmb_dav_1; }
struct CSCDMBHeader2005::@483 bits

◆ setBXN()

void CSCDMBHeader2005::setBXN ( int  bxn)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 43 of file CSCDMBHeader2005.cc.

References bits, and bxn().

43  {
44  bits.dmb_bxn = bxn & 0x3F;
45  bits.dmb_bxn1 = bxn & 0xFFF;
46 }
struct CSCDMBHeader2005::@483 bits
unsigned bxn() const override

◆ setCrateAddress()

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

Implements CSCVDMBHeaderFormat.

Definition at line 48 of file CSCDMBHeader2005.cc.

References bits.

48  {
49  this->bits.dmb_crate = crate;
50  this->bits.dmb_id = dmbId;
51 }
struct CSCDMBHeader2005::@483 bits

◆ setdmbID()

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::@483 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.

References bits, and l1a().

36 { bits.dmb_l1a = l1a; }
struct CSCDMBHeader2005::@483 bits
unsigned l1a() const override

◆ setL1A24()

void CSCDMBHeader2005::setL1A24 ( int  l1a)
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 38 of file CSCDMBHeader2005.cc.

References bits, and l1a().

38  {
39  bits.dmb_l1a_lowo = l1a & 0xFFF;
40  bits.dmb_l1a_hiwo = (l1a >> 12) & 0xFFF;
41 }
struct CSCDMBHeader2005::@483 bits
unsigned l1a() const override

◆ sizeInWords()

unsigned CSCDMBHeader2005::sizeInWords ( ) const
overridevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 53 of file CSCDMBHeader2005.cc.

Referenced by CSCDMBHeader2005().

53 { return 8; }

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.