CMS 3D CMS Logo

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

#include <CSCDMBHeader.h>

Public Member Functions

unsigned activeDavMismatch () const
 
void addCFEB (int icfeb)
 
void addNALCT ()
 
void addNCLCT ()
 
unsigned bxn () const
 
unsigned bxn12 () const
 
unsigned cfebActive () const
 
bool cfebAvailable (unsigned icfeb)
 counts from zero More...
 
unsigned cfebAvailable () const
 
unsigned cfebMovlp () const
 
bool check () const
 
unsigned crateID () const
 
 CSCDMBHeader ()
 
 CSCDMBHeader (unsigned short *buf)
 
 CSCDMBHeader (const CSCDMBStatusDigi &digi)
 
unsigned short * data ()
 
unsigned short * data () const
 
unsigned dmbCfebSync () const
 
unsigned dmbID () const
 
unsigned l1a () const
 
unsigned nalct () const
 
unsigned nclct () const
 
void setBXN (int bxn)
 
void setCrateAddress (int crate, int dmbId)
 
void setdmbID (int newDMBID)
 
void setL1A (int l1a)
 
unsigned sizeInWords () const
 

Private Attributes

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
 
unsigned cfeb_dav_1: 5
 
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
 
unsigned dmb_bxn1: 12
 
unsigned dmb_cfeb_sync: 4
 
unsigned dmb_crate: 8
 
unsigned dmb_id: 4
 
unsigned dmb_l1a: 8
 
unsigned dmb_l1a_copy1: 12
 
unsigned dmb_l1a_copy2: 12
 
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
 

Detailed Description

Definition at line 9 of file CSCDMBHeader.h.

Constructor & Destructor Documentation

CSCDMBHeader::CSCDMBHeader ( )

Definition at line 5 of file CSCDMBHeader.cc.

References ddu_code_1, ddu_code_2, ddu_code_3, ddu_code_4, newddu_code_1, newddu_code_2, newddu_code_3, newddu_code_4, and sizeInWords().

6 {
7  bzero(this, sizeInWords()*2);
10 }
unsigned newddu_code_3
constant, should be 1001
Definition: CSCDMBHeader.h:69
unsigned newddu_code_2
constant, should be 1001
Definition: CSCDMBHeader.h:62
unsigned ddu_code_1
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:85
unsigned sizeInWords() const
Definition: CSCDMBHeader.cc:97
unsigned newddu_code_4
constant, should be 1001
Definition: CSCDMBHeader.h:74
unsigned ddu_code_2
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:90
unsigned ddu_code_3
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:100
unsigned newddu_code_1
constant, should be 1001
Definition: CSCDMBHeader.h:58
unsigned ddu_code_4
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:105
CSCDMBHeader::CSCDMBHeader ( unsigned short *  buf)

Definition at line 12 of file CSCDMBHeader.cc.

References sizeInWords().

13 {
14  memcpy(this, buf, sizeInWords()*2);
15 }
unsigned sizeInWords() const
Definition: CSCDMBHeader.cc:97
CSCDMBHeader::CSCDMBHeader ( const CSCDMBStatusDigi digi)
inline

Definition at line 16 of file CSCDMBHeader.h.

References CSCDMBStatusDigi::header(), and sizeInWords().

17  {
18  memcpy(this, digi.header(), sizeInWords()*2);
19  }
unsigned sizeInWords() const
Definition: CSCDMBHeader.cc:97
const uint16_t * header() const
Data Accessors.

Member Function Documentation

unsigned CSCDMBHeader::activeDavMismatch ( ) const

Definition at line 29 of file CSCDMBHeader.cc.

References active_dav_mismatch.

30 {
31  return active_dav_mismatch;
32 }
unsigned active_dav_mismatch
Definition: CSCDMBHeader.h:78
void CSCDMBHeader::addCFEB ( int  icfeb)

Definition at line 109 of file CSCDMBHeader.cc.

References cfeb_dav.

Referenced by CSCEventData::add().

110 {
111  assert(icfeb < 5);
112  cfeb_dav |= (1 << icfeb);
113 }
unsigned cfeb_dav
Definition: CSCDMBHeader.h:76
void CSCDMBHeader::addNALCT ( )

Definition at line 120 of file CSCDMBHeader.cc.

References alct_dav_1, alct_dav_2, and alct_dav_4.

Referenced by CSCEventData::checkALCTClasses().

121 {
123 }
unsigned alct_dav_1
Definition: CSCDMBHeader.h:77
unsigned alct_dav_4
Definition: CSCDMBHeader.h:66
unsigned alct_dav_2
Definition: CSCDMBHeader.h:81
void CSCDMBHeader::addNCLCT ( )

Definition at line 115 of file CSCDMBHeader.cc.

References tmb_dav_1, tmb_dav_2, and tmb_dav_4.

Referenced by CSCEventData::checkTMBClasses().

116 {
117  tmb_dav_1 = tmb_dav_2 = tmb_dav_4 = 1;
118 }
unsigned tmb_dav_1
Definition: CSCDMBHeader.h:79
unsigned tmb_dav_2
Definition: CSCDMBHeader.h:83
unsigned tmb_dav_4
Definition: CSCDMBHeader.h:67
unsigned CSCDMBHeader::bxn ( ) const
unsigned CSCDMBHeader::bxn12 ( ) const

Definition at line 66 of file CSCDMBHeader.cc.

References dmb_bxn1.

Referenced by cscdqm::EventProcessor::processCSC().

67 {
68  return dmb_bxn1;
69 }
unsigned dmb_bxn1
Definition: CSCDMBHeader.h:72
unsigned CSCDMBHeader::cfebActive ( ) const
inline

Definition at line 31 of file CSCDMBHeader.h.

References cfeb_active.

Referenced by cscdqm::EventProcessor::processCSC().

31 {return cfeb_active;}
unsigned cfeb_active
Definition: CSCDMBHeader.h:65
bool CSCDMBHeader::cfebAvailable ( unsigned  icfeb)

counts from zero

Definition at line 103 of file CSCDMBHeader.cc.

References cfebAvailable().

Referenced by cscdqm::EventProcessor::processCSC(), and CSCEventData::unpack_data().

104 {
105  assert (icfeb < 5);
106  return (cfebAvailable() >> icfeb) & 1;
107 }
unsigned cfebAvailable() const
Definition: CSCDMBHeader.cc:35
unsigned CSCDMBHeader::cfebAvailable ( ) const

Definition at line 35 of file CSCDMBHeader.cc.

References cfeb_dav.

Referenced by cfebAvailable().

36 {
37  return cfeb_dav;
38 }
unsigned cfeb_dav
Definition: CSCDMBHeader.h:76
unsigned CSCDMBHeader::cfebMovlp ( ) const

Definition at line 18 of file CSCDMBHeader.cc.

References cfeb_movlp.

Referenced by cscdqm::EventProcessor::processCSC().

19 {
20  return cfeb_movlp;
21 }
unsigned cfeb_movlp
Definition: CSCDMBHeader.h:98
bool CSCDMBHeader::check ( ) const

Definition at line 126 of file CSCDMBHeader.cc.

References ddu_code_1, ddu_code_2, ddu_code_3, ddu_code_4, newddu_code_1, newddu_code_2, newddu_code_3, and newddu_code_4.

Referenced by CSCEventData::unpack_data().

127 {
128  return (ddu_code_1==0xA && ddu_code_2==0xA &&
129  ddu_code_3==0xA && ddu_code_4==0xA &&
130  newddu_code_1==0x9 && newddu_code_2==0x9 &&
131  newddu_code_3==0x9 && newddu_code_4==0x9);
132 }
unsigned newddu_code_3
constant, should be 1001
Definition: CSCDMBHeader.h:69
unsigned newddu_code_2
constant, should be 1001
Definition: CSCDMBHeader.h:62
unsigned ddu_code_1
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:85
unsigned newddu_code_4
constant, should be 1001
Definition: CSCDMBHeader.h:74
unsigned ddu_code_2
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:90
unsigned ddu_code_3
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:100
unsigned newddu_code_1
constant, should be 1001
Definition: CSCDMBHeader.h:58
unsigned ddu_code_4
constant, should be &#39;1010&#39;
Definition: CSCDMBHeader.h:105
unsigned CSCDMBHeader::crateID ( ) const

Definition at line 51 of file CSCDMBHeader.cc.

References dmb_crate.

Referenced by cscdqm::EventProcessor::processCSC().

52 {
53  return dmb_crate;
54 }
unsigned dmb_crate
Definition: CSCDMBHeader.h:88
unsigned short* CSCDMBHeader::data ( )
inline

Definition at line 48 of file CSCDMBHeader.h.

Referenced by cuy.FindIssue::__init__(), and CSCEventData::pack().

48 {return (unsigned short *) this;}
unsigned short* CSCDMBHeader::data ( ) const
inline

Definition at line 49 of file CSCDMBHeader.h.

Referenced by cuy.FindIssue::__init__().

49 {return (unsigned short *) this;}
unsigned CSCDMBHeader::dmbCfebSync ( ) const

Definition at line 24 of file CSCDMBHeader.cc.

References dmb_cfeb_sync.

Referenced by cscdqm::EventProcessor::processCSC().

25 {
26  return dmb_cfeb_sync;
27 }
unsigned dmb_cfeb_sync
Definition: CSCDMBHeader.h:103
unsigned CSCDMBHeader::dmbID ( ) const
unsigned CSCDMBHeader::l1a ( ) const
unsigned CSCDMBHeader::nalct ( ) const

Definition at line 41 of file CSCDMBHeader.cc.

References alct_dav_1.

Referenced by CSCEventData::nalct(), and cscdqm::EventProcessor::processCSC().

42 {
43  return alct_dav_1;
44 }
unsigned alct_dav_1
Definition: CSCDMBHeader.h:77
unsigned CSCDMBHeader::nclct ( ) const

Definition at line 46 of file CSCDMBHeader.cc.

References tmb_dav_1.

Referenced by CSCEventData::nclct(), and cscdqm::EventProcessor::processCSC().

47 {
48  return tmb_dav_1;
49 }
unsigned tmb_dav_1
Definition: CSCDMBHeader.h:79
void CSCDMBHeader::setBXN ( int  bxn)

Definition at line 85 of file CSCDMBHeader.cc.

References bxn(), and dmb_bxn.

Referenced by CSCEventData::setEventInformation().

86 {
87  dmb_bxn = bxn;
88 }
unsigned bxn() const
Definition: CSCDMBHeader.cc:61
unsigned dmb_bxn
Definition: CSCDMBHeader.h:95
void CSCDMBHeader::setCrateAddress ( int  crate,
int  dmbId 
)

Definition at line 91 of file CSCDMBHeader.cc.

References dmb_crate, and dmb_id.

Referenced by CSCDigiToRaw::findEventData().

92 {
93  this->dmb_crate = crate;
94  this->dmb_id = dmbId;
95 }
unsigned dmb_crate
Definition: CSCDMBHeader.h:88
unsigned dmb_id
Definition: CSCDMBHeader.h:87
void CSCDMBHeader::setdmbID ( int  newDMBID)
inline

Definition at line 29 of file CSCDMBHeader.h.

References dmb_id.

Referenced by CSCDDUEventData::add().

29 {dmb_id = newDMBID;}
unsigned dmb_id
Definition: CSCDMBHeader.h:87
void CSCDMBHeader::setL1A ( int  l1a)

Definition at line 80 of file CSCDMBHeader.cc.

References dmb_l1a, and l1a().

Referenced by CSCEventData::setEventInformation().

81 {
82  dmb_l1a = l1a;
83 }
unsigned l1a() const
Definition: CSCDMBHeader.cc:74
unsigned dmb_l1a
Definition: CSCDMBHeader.h:102
unsigned CSCDMBHeader::sizeInWords ( ) const

Definition at line 97 of file CSCDMBHeader.cc.

Referenced by CSCDMBHeader(), CSCEventData::pack(), and CSCEventData::unpack_data().

98 {
99  return 8;
100 }

Member Data Documentation

unsigned CSCDMBHeader::active_dav_mismatch
private

Definition at line 78 of file CSCDMBHeader.h.

Referenced by activeDavMismatch().

unsigned CSCDMBHeader::active_dav_mismatch_2
private

Definition at line 80 of file CSCDMBHeader.h.

unsigned CSCDMBHeader::active_dav_mismatch_3
private

Definition at line 82 of file CSCDMBHeader.h.

unsigned CSCDMBHeader::alct_dav_1
private

Definition at line 77 of file CSCDMBHeader.h.

Referenced by addNALCT(), and nalct().

unsigned CSCDMBHeader::alct_dav_2
private

Definition at line 81 of file CSCDMBHeader.h.

Referenced by addNALCT().

unsigned CSCDMBHeader::alct_dav_4
private

Definition at line 66 of file CSCDMBHeader.h.

Referenced by addNALCT().

unsigned CSCDMBHeader::cfeb_active
private

Definition at line 65 of file CSCDMBHeader.h.

Referenced by cfebActive().

unsigned CSCDMBHeader::cfeb_dav
private

Definition at line 76 of file CSCDMBHeader.h.

Referenced by addCFEB(), and cfebAvailable().

unsigned CSCDMBHeader::cfeb_dav_1
private

Definition at line 64 of file CSCDMBHeader.h.

unsigned CSCDMBHeader::cfeb_movlp
private

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

Definition at line 98 of file CSCDMBHeader.h.

Referenced by cfebMovlp().

unsigned CSCDMBHeader::ddu_code_1
private

constant, should be '1010'

Definition at line 85 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::ddu_code_2
private

constant, should be '1010'

Definition at line 90 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::ddu_code_3
private

constant, should be '1010'

Definition at line 100 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::ddu_code_4
private

constant, should be '1010'

Definition at line 105 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::dmb_bxn
private

Definition at line 95 of file CSCDMBHeader.h.

Referenced by bxn(), and setBXN().

unsigned CSCDMBHeader::dmb_bxn1
private

Definition at line 72 of file CSCDMBHeader.h.

Referenced by bxn12().

unsigned CSCDMBHeader::dmb_cfeb_sync
private

Definition at line 103 of file CSCDMBHeader.h.

Referenced by dmbCfebSync().

unsigned CSCDMBHeader::dmb_crate
private

Definition at line 88 of file CSCDMBHeader.h.

Referenced by crateID(), and setCrateAddress().

unsigned CSCDMBHeader::dmb_id
private

Definition at line 87 of file CSCDMBHeader.h.

Referenced by dmbID(), setCrateAddress(), and setdmbID().

unsigned CSCDMBHeader::dmb_l1a
private

Definition at line 102 of file CSCDMBHeader.h.

Referenced by l1a(), and setL1A().

unsigned CSCDMBHeader::dmb_l1a_copy1
private

Definition at line 60 of file CSCDMBHeader.h.

unsigned CSCDMBHeader::dmb_l1a_copy2
private

Definition at line 56 of file CSCDMBHeader.h.

unsigned CSCDMBHeader::newddu_code_1
private

constant, should be 1001

Definition at line 58 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::newddu_code_2
private

constant, should be 1001

Definition at line 62 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::newddu_code_3
private

constant, should be 1001

Definition at line 69 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::newddu_code_4
private

constant, should be 1001

Definition at line 74 of file CSCDMBHeader.h.

Referenced by check(), and CSCDMBHeader().

unsigned CSCDMBHeader::tmb_dav_1
private

Definition at line 79 of file CSCDMBHeader.h.

Referenced by addNCLCT(), and nclct().

unsigned CSCDMBHeader::tmb_dav_2
private

Definition at line 83 of file CSCDMBHeader.h.

Referenced by addNCLCT().

unsigned CSCDMBHeader::tmb_dav_4
private

Definition at line 67 of file CSCDMBHeader.h.

Referenced by addNCLCT().