CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
CSCDMBHeader2013 Struct Reference

#include <CSCDMBHeader2013.h>

Inheritance diagram for CSCDMBHeader2013:
CSCVDMBHeaderFormat

Public Member Functions

virtual unsigned activeDavMismatch () const
 
virtual void addCFEB (int icfeb)
 
virtual void addNALCT ()
 
virtual void addNCLCT ()
 
virtual unsigned bxn () const
 
virtual unsigned bxn12 () const
 
virtual unsigned cfebActive () const
 
virtual bool cfebAvailable (unsigned icfeb)
 counts from zero More...
 
virtual unsigned cfebAvailable () const
 
virtual unsigned cfebMovlp () const
 
bool check () const
 
virtual unsigned crateID () const
 
 CSCDMBHeader2013 ()
 
 CSCDMBHeader2013 (unsigned short *buf)
 
virtual unsigned short * data ()
 
virtual unsigned short * data () const
 
virtual unsigned dmbCfebSync () const
 
virtual unsigned dmbID () const
 
virtual unsigned format_version () const
 
virtual unsigned l1a () const
 
virtual unsigned l1a24 () const
 
virtual unsigned nalct () const
 
virtual unsigned nclct () const
 
virtual void setBXN (int bxn)
 
virtual void setCrateAddress (int crate, int dmbId)
 
virtual void setdmbID (int newDMBID)
 
virtual void setdmbVersion (unsigned int version)
 
virtual void setL1A (int l1a)
 
virtual void setL1A24 (int l1a)
 
unsigned sizeInWords () const
 
- 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 44 of file CSCDMBHeader2013.h.

Constructor & Destructor Documentation

CSCDMBHeader2013::CSCDMBHeader2013 ( )

Definition at line 5 of file CSCDMBHeader2013.cc.

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

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

Definition at line 12 of file CSCDMBHeader2013.cc.

References data(), and sizeInWords().

13 {
14  memcpy(data(), buf, sizeInWords()*2);
15 }
virtual unsigned short * data()
unsigned sizeInWords() const

Member Function Documentation

unsigned CSCDMBHeader2013::activeDavMismatch ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2013.cc.

References bits.

30 {
31  return bits.clct_dav_mismatch;
32 }
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::addCFEB ( int  icfeb)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 123 of file CSCDMBHeader2013.cc.

References assert(), and bits.

124 {
125  assert(icfeb < 7);
126  bits.cfeb_dav |= (1 << icfeb);
127  bits.cfeb_clct_sent |= (1 << icfeb);
128 }
assert(m_qm.get())
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::addNALCT ( )
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 135 of file CSCDMBHeader2013.cc.

References bits.

136 {
137  bits.alct_dav = bits.alct_dav_copy = bits.alct_dav_copy2 = 1;
138 }
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::addNCLCT ( )
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 130 of file CSCDMBHeader2013.cc.

References bits.

131 {
132  bits.tmb_dav = bits.tmb_dav_copy = bits.tmb_dav_copy2 = 1;
133 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::bxn ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2013.cc.

References bits.

67 {
68  return bits.dmb_bxn;
69 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::bxn12 ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 71 of file CSCDMBHeader2013.cc.

References bits.

72 {
73  return bits.dmb_bxn1;
74 }
struct CSCDMBHeader2013::@300 bits
virtual unsigned CSCDMBHeader2013::cfebActive ( ) const
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 68 of file CSCDMBHeader2013.h.

References bits.

68 { return bits.cfeb_clct_sent; }
struct CSCDMBHeader2013::@300 bits
bool CSCDMBHeader2013::cfebAvailable ( unsigned  icfeb)
virtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 117 of file CSCDMBHeader2013.cc.

References assert(), and cfebAvailable().

118 {
119  assert (icfeb < 7);
120  return (cfebAvailable() >> icfeb) & 1;
121 }
assert(m_qm.get())
virtual unsigned cfebAvailable() const
unsigned CSCDMBHeader2013::cfebAvailable ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 40 of file CSCDMBHeader2013.cc.

References bits.

Referenced by cfebAvailable().

41 {
42  return bits.cfeb_dav;
43 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::cfebMovlp ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2013.cc.

References bits.

19 {
20  return bits.cfeb_movlp;
21 }
struct CSCDMBHeader2013::@300 bits
bool CSCDMBHeader2013::check ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 141 of file CSCDMBHeader2013.cc.

References bits.

142 {
143  return (bits.ddu_code_1==0xA && bits.ddu_code_2==0xA &&
144  bits.ddu_code_3==0xA && bits.ddu_code_4==0xA &&
145  bits.newddu_code_1==0x9 && bits.newddu_code_2==0x9 &&
146  bits.newddu_code_3==0x9 && bits.newddu_code_4==0x9);
147 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::crateID ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2013.cc.

References bits.

57 {
58  return bits.dmb_crate;
59 }
struct CSCDMBHeader2013::@300 bits
virtual unsigned short* CSCDMBHeader2013::data ( )
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 87 of file CSCDMBHeader2013.h.

References bits.

Referenced by cuy.FindIssue::__init__(), and CSCDMBHeader2013().

87 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2013::@300 bits
virtual unsigned short* CSCDMBHeader2013::data ( ) const
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 88 of file CSCDMBHeader2013.h.

References bits.

Referenced by cuy.FindIssue::__init__().

88 { return (unsigned short *)(&bits);}
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::dmbCfebSync ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2013.cc.

References bits.

25 {
26  return bits.dmb_cfeb_sync;
27 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::dmbID ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 61 of file CSCDMBHeader2013.cc.

References bits.

62 {
63  return bits.dmb_id;
64 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::format_version ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2013.cc.

References bits.

Referenced by argparse.ArgumentParser::print_version(), and python.rootplot.argparse.ArgumentParser::print_version().

35 {
36  return bits.fmt_version;
37 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::l1a ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 76 of file CSCDMBHeader2013.cc.

References bits.

77 {
78  return bits.dmb_l1a;
79 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::l1a24 ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 81 of file CSCDMBHeader2013.cc.

References bits.

82 {
83  return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)) ;
84 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::nalct ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2013.cc.

References bits.

47 {
48  return bits.alct_dav;
49 }
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::nclct ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2013.cc.

References bits.

52 {
53  return bits.tmb_dav;
54 }
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::setBXN ( int  bxn)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 98 of file CSCDMBHeader2013.cc.

References bits.

99 {
100  bits.dmb_bxn1 = bxn & 0xFFF;
101  bits.dmb_bxn = bxn & 0x1F;
102 }
struct CSCDMBHeader2013::@300 bits
virtual unsigned bxn() const
void CSCDMBHeader2013::setCrateAddress ( int  crate,
int  dmbId 
)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 105 of file CSCDMBHeader2013.cc.

References bits.

106 {
107  this->bits.dmb_crate = crate;
108  this->bits.dmb_id = dmbId;
109 }
struct CSCDMBHeader2013::@300 bits
virtual void CSCDMBHeader2013::setdmbID ( int  newDMBID)
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 65 of file CSCDMBHeader2013.h.

References bits.

65 { bits.dmb_id = newDMBID; }
struct CSCDMBHeader2013::@300 bits
virtual void CSCDMBHeader2013::setdmbVersion ( unsigned int  version)
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2013.h.

References bits.

66 {bits.fmt_version = (version<4) ? version: 0;}
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::setL1A ( int  l1a)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 86 of file CSCDMBHeader2013.cc.

References bits.

87 {
88  bits.dmb_l1a = l1a & 0x1F;
89 }
virtual unsigned l1a() const
struct CSCDMBHeader2013::@300 bits
void CSCDMBHeader2013::setL1A24 ( int  l1a)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 91 of file CSCDMBHeader2013.cc.

References bits.

92 {
93  bits.dmb_l1a_lowo = l1a & 0xFFF;
94  bits.dmb_l1a_hiwo = (l1a>>12) & 0xFFF;
95 }
virtual unsigned l1a() const
struct CSCDMBHeader2013::@300 bits
unsigned CSCDMBHeader2013::sizeInWords ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 111 of file CSCDMBHeader2013.cc.

Referenced by CSCDMBHeader2013().

112 {
113  return 8;
114 }

Member Data Documentation

unsigned CSCDMBHeader2013::alct_dav

TMB_DAV(1)

Definition at line 109 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::alct_dav_copy

TMB_DAV(1)

Definition at line 121 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::alct_dav_copy2

TMB_DAV(1)

Definition at line 136 of file CSCDMBHeader2013.h.

struct { ... } CSCDMBHeader2013::bits
unsigned CSCDMBHeader2013::cfeb_clct_sent

constant, should be 1001

3rd Header word

Definition at line 105 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::cfeb_dav

constant, should be 1001

5th Header word

Definition at line 117 of file CSCDMBHeader2013.h.

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

unsigned CSCDMBHeader2013::clct_dav_mismatch

CFEB_CLCT_SENT(7:1)

Definition at line 106 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy

CFEB_DAV(7:1)

Definition at line 118 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::clct_dav_mismatch_copy2

DMB_L1A[4:0].

Definition at line 141 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_1

ALCT_DAV(1)

Definition at line 122 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_2

DMB_CRATE(8)

Definition at line 127 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_3

ALCT_DAV(1)

Definition at line 137 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::ddu_code_4

DMB-CFEB-Sync[3:0].

Definition at line 144 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_bxn

constant, should be '1010'

7th Header word

Definition at line 131 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_bxn1

constant, should be 1001

4th Header word

Definition at line 113 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_cfeb_sync

Fmt_Vers(1:0)

Definition at line 143 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_crate

DMB_ID(4)

Definition at line 126 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_id

constant, should be '1010'

6th Header word

Definition at line 125 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a

constant, should be '1010'

8th Header word

Definition at line 140 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a_hiwo

constant, should be 1001

2nd Header word

Definition at line 101 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::dmb_l1a_lowo

1st Header word

Definition at line 97 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version

CLCT-DAV-Mismatch(1)

Definition at line 107 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version_copy

CLCT-DAV-Mismatch(1)

Definition at line 119 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::fmt_version_copy2

CLCT-DAV-Mismatch(1)

Definition at line 142 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_1

DMB_L1A[11:0].

Definition at line 98 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_2

DMB_L1A[23:12].

Definition at line 102 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_3

ALCT_DAV(1)

Definition at line 110 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::newddu_code_4

DMB_BXN[11:0].

Definition at line 114 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav

Fmt_Vers(1:0)

Definition at line 108 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav_copy

Fmt_Vers(1:0)

Definition at line 120 of file CSCDMBHeader2013.h.

unsigned CSCDMBHeader2013::tmb_dav_copy2

CFEB_MOVLP(5:1)

Definition at line 135 of file CSCDMBHeader2013.h.