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
CSCDMBHeader2005 Struct Reference

#include <CSCDMBHeader2005.h>

Inheritance diagram for CSCDMBHeader2005:
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
 
virtual bool check () const
 
virtual unsigned crateID () const
 
 CSCDMBHeader2005 ()
 
 CSCDMBHeader2005 (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   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::CSCDMBHeader2005 ( )

Definition at line 5 of file CSCDMBHeader2005.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 }
virtual unsigned short * data()
unsigned sizeInWords() const
struct CSCDMBHeader2005::@304 bits
CSCDMBHeader2005::CSCDMBHeader2005 ( unsigned short *  buf)

Definition at line 12 of file CSCDMBHeader2005.cc.

References data(), and sizeInWords().

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

Member Function Documentation

unsigned CSCDMBHeader2005::activeDavMismatch ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 29 of file CSCDMBHeader2005.cc.

References bits.

30 {
31  return bits.active_dav_mismatch;
32 }
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::addCFEB ( int  icfeb)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 127 of file CSCDMBHeader2005.cc.

References bits.

128 {
129  assert(icfeb < 5);
130  bits.cfeb_dav |= (1 << icfeb);
131  bits.cfeb_active |= (1 << icfeb);
132 }
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::addNALCT ( )
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 139 of file CSCDMBHeader2005.cc.

References bits.

140 {
141  bits.alct_dav_1 = bits.alct_dav_2 = bits.alct_dav_4 = 1;
142 }
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::addNCLCT ( )
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 134 of file CSCDMBHeader2005.cc.

References bits.

135 {
136  bits.tmb_dav_1 = bits.tmb_dav_2 = bits.tmb_dav_4 = 1;
137 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::bxn ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 61 of file CSCDMBHeader2005.cc.

References bits.

62 {
63  return bits.dmb_bxn;
64 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::bxn12 ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 66 of file CSCDMBHeader2005.cc.

References bits.

67 {
68  return bits.dmb_bxn1;
69 }
struct CSCDMBHeader2005::@304 bits
virtual unsigned CSCDMBHeader2005::cfebActive ( ) const
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 34 of file CSCDMBHeader2005.h.

References bits.

34 {return bits.cfeb_active;}
struct CSCDMBHeader2005::@304 bits
bool CSCDMBHeader2005::cfebAvailable ( unsigned  icfeb)
virtual

counts from zero

Implements CSCVDMBHeaderFormat.

Definition at line 116 of file CSCDMBHeader2005.cc.

References cfebAvailable().

117 {
118  assert (icfeb < 5);
119  return (cfebAvailable() >> icfeb) & 1;
120 }
virtual unsigned cfebAvailable() const
unsigned CSCDMBHeader2005::cfebAvailable ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 35 of file CSCDMBHeader2005.cc.

References bits.

Referenced by cfebAvailable().

36 {
37  return bits.cfeb_dav;
38 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::cfebMovlp ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 18 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 145 of file CSCDMBHeader2005.cc.

References bits.

146 {
147  return (bits.ddu_code_1==0xA && bits.ddu_code_2==0xA &&
148  bits.ddu_code_3==0xA && bits.ddu_code_4==0xA &&
149  bits.newddu_code_1==0x9 && bits.newddu_code_2==0x9 &&
150  bits.newddu_code_3==0x9 && bits.newddu_code_4==0x9);
151 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::crateID ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 51 of file CSCDMBHeader2005.cc.

References bits.

52 {
53  return bits.dmb_crate;
54 }
struct CSCDMBHeader2005::@304 bits
virtual unsigned short* CSCDMBHeader2005::data ( )
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 53 of file CSCDMBHeader2005.h.

References bits.

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

53 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2005::@304 bits
virtual unsigned short* CSCDMBHeader2005::data ( ) const
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 54 of file CSCDMBHeader2005.h.

References bits.

Referenced by cuy.FindIssue::__init__().

54 {return (unsigned short *)(&bits);}
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::dmbCfebSync ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 24 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 56 of file CSCDMBHeader2005.cc.

References bits.

57 {
58  return bits.dmb_id;
59 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::format_version ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 122 of file CSCDMBHeader2005.cc.

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

123 {
124  return 0;
125 }
unsigned CSCDMBHeader2005::l1a ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 74 of file CSCDMBHeader2005.cc.

References bits.

Referenced by setL1A().

75 {
76  return bits.dmb_l1a;
77 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::l1a24 ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 79 of file CSCDMBHeader2005.cc.

References bits.

80 {
81  return (bits.dmb_l1a_lowo | (bits.dmb_l1a_hiwo << 12)) ;
82 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::nalct ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 41 of file CSCDMBHeader2005.cc.

References bits.

42 {
43  return bits.alct_dav_1;
44 }
struct CSCDMBHeader2005::@304 bits
unsigned CSCDMBHeader2005::nclct ( ) const
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 46 of file CSCDMBHeader2005.cc.

References bits.

47 {
48  return bits.tmb_dav_1;
49 }
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::setBXN ( int  bxn)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 97 of file CSCDMBHeader2005.cc.

References bits.

98 {
99  bits.dmb_bxn = bxn & 0x3F;
100  bits.dmb_bxn1 = bxn & 0xFFF;
101 }
virtual unsigned bxn() const
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::setCrateAddress ( int  crate,
int  dmbId 
)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 104 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 31 of file CSCDMBHeader2005.h.

References bits.

31 {bits.dmb_id = newDMBID;}
struct CSCDMBHeader2005::@304 bits
virtual void CSCDMBHeader2005::setdmbVersion ( unsigned int  version)
inlinevirtual

Implements CSCVDMBHeaderFormat.

Definition at line 32 of file CSCDMBHeader2005.h.

32 {}
void CSCDMBHeader2005::setL1A ( int  l1a)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 85 of file CSCDMBHeader2005.cc.

References bits, and l1a().

86 {
87  bits.dmb_l1a = l1a;
88 }
virtual unsigned l1a() const
struct CSCDMBHeader2005::@304 bits
void CSCDMBHeader2005::setL1A24 ( int  l1a)
virtual

Implements CSCVDMBHeaderFormat.

Definition at line 90 of file CSCDMBHeader2005.cc.

References bits.

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

Implements CSCVDMBHeaderFormat.

Definition at line 110 of file CSCDMBHeader2005.cc.

Referenced by CSCDMBHeader2005().

111 {
112  return 8;
113 }

Member Data Documentation

unsigned CSCDMBHeader2005::active_dav_mismatch

Definition at line 90 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::active_dav_mismatch_2

Definition at line 92 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::active_dav_mismatch_3

Definition at line 94 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_1

Definition at line 89 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_2

Definition at line 93 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::alct_dav_4

Definition at line 76 of file CSCDMBHeader2005.h.

struct { ... } CSCDMBHeader2005::bits
unsigned CSCDMBHeader2005::cfeb_active

Definition at line 75 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_dav

5th Header word

Definition at line 88 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_dav_1

3rd Header word

Definition at line 74 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::cfeb_movlp

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

Definition at line 109 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_1

constant, should be '1010'

Definition at line 97 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_2

constant, should be '1010'

Definition at line 103 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_3

constant, should be '1010'

Definition at line 111 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::ddu_code_4

constant, should be '1010'

Definition at line 117 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_bxn

7th Header word

Definition at line 106 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_bxn1

4th Header word

Definition at line 83 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_cfeb_sync

Definition at line 115 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_crate

Definition at line 101 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_id

6th Header word

Definition at line 100 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a

8th Header word

Definition at line 114 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a_hiwo

2nd Header word

Definition at line 69 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::dmb_l1a_lowo

1st Header word

Definition at line 64 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_1

constant, should be 1001

Definition at line 66 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_2

constant, should be 1001

Definition at line 71 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_3

constant, should be 1001

Definition at line 79 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::newddu_code_4

constant, should be 1001

Definition at line 85 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_1

Definition at line 91 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_2

Definition at line 95 of file CSCDMBHeader2005.h.

unsigned CSCDMBHeader2005::tmb_dav_4

Definition at line 77 of file CSCDMBHeader2005.h.