CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
CSCDDUTrailer Class Reference

#include <CSCDDUTrailer.h>

Public Member Functions

bool check () const
 
 CSCDDUTrailer ()
 
 CSCDDUTrailer (const CSCDDUStatusDigi &digi)
 
unsigned short * data ()
 
unsigned dmb_full () const
 
unsigned dmb_warn () const
 
unsigned errorstat () const
 
unsigned reserved () const
 
void setFromBuffer (uint16_t const *buf)
 
void setWordCount (unsigned wordcount)
 
unsigned wordcount () const
 

Static Public Member Functions

static unsigned sizeInWords ()
 

Private Attributes

unsigned cms_directive_0xA: 4
 constant, should be 1010 More...
 
unsigned dmb_full_: 16
 
unsigned dmb_warn_: 16
 Active DMB Count (4 bits) More...
 
unsigned errorstat_: 32
 
unsigned trailer2_1: 16
 should be 8000/8000/FFFF/8000 More...
 
unsigned trailer2_2: 16
 
unsigned trailer2_3: 16
 
unsigned trailer2_4: 16
 
unsigned whatever: 4
 
unsigned word1: 4
 
unsigned word2: 4
 
unsigned word3: 4
 
unsigned word4: 4
 
unsigned word5: 4
 
unsigned word6: 4
 
unsigned word7: 4
 
unsigned word8: 4
 
unsigned word_count_: 24
 

Detailed Description

documented at http://www.physics.ohio-state.edu/~cms/ddu/ddu2.html

Definition at line 14 of file CSCDDUTrailer.h.

Constructor & Destructor Documentation

CSCDDUTrailer::CSCDDUTrailer ( )
inline

Definition at line 18 of file CSCDDUTrailer.h.

References sizeInWords(), trailer2_1, trailer2_2, trailer2_3, and trailer2_4.

19  {
20  bzero(this, sizeInWords()*2);
21  trailer2_1 = trailer2_2 = trailer2_4 = 0x8000;
22  trailer2_3 = 0xFFFF;
23  }
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:33
unsigned trailer2_4
Definition: CSCDDUTrailer.h:63
unsigned trailer2_2
Definition: CSCDDUTrailer.h:61
unsigned trailer2_1
should be 8000/8000/FFFF/8000
Definition: CSCDDUTrailer.h:60
unsigned trailer2_3
Definition: CSCDDUTrailer.h:62
CSCDDUTrailer::CSCDDUTrailer ( const CSCDDUStatusDigi digi)
inline

Definition at line 24 of file CSCDDUTrailer.h.

References sizeInWords(), and CSCDDUStatusDigi::trailer().

25  {
26  memcpy(this, digi.trailer(), sizeInWords()*2);
27  }
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:33
const uint16_t * trailer() const

Member Function Documentation

bool CSCDDUTrailer::check ( ) const
inline

Definition at line 35 of file CSCDDUTrailer.h.

References trailer2_1, trailer2_2, trailer2_3, and trailer2_4.

Referenced by CSCDDUEventData::check(), cscdqm::EventProcessor::processDDU(), and CSCDDUEventData::unpack_data().

35  {
36  //std::cout << std:: hex << "DDUTRAILER CHECK " << trailer2_1 << " "
37  // << trailer2_2 << " " << trailer2_3 << " "
38  // << trailer2_4 << std:: dec << std::endl;
39  return trailer2_1 == 0x8000 && trailer2_2 == 0x8000
40  && trailer2_3 == 0xFFFF && trailer2_4 == 0x8000;}
unsigned trailer2_4
Definition: CSCDDUTrailer.h:63
unsigned trailer2_2
Definition: CSCDDUTrailer.h:61
unsigned trailer2_1
should be 8000/8000/FFFF/8000
Definition: CSCDDUTrailer.h:60
unsigned trailer2_3
Definition: CSCDDUTrailer.h:62
unsigned short* CSCDDUTrailer::data ( )
inline

Definition at line 42 of file CSCDDUTrailer.h.

Referenced by CSCDDUEventData::pack().

42 {return (unsigned short *) this;}
unsigned CSCDDUTrailer::dmb_full ( ) const
inline

Definition at line 52 of file CSCDDUTrailer.h.

References dmb_full_.

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

52 { return dmb_full_; }
unsigned dmb_full_
Definition: CSCDDUTrailer.h:67
unsigned CSCDDUTrailer::dmb_warn ( ) const
inline

Definition at line 51 of file CSCDDUTrailer.h.

References dmb_warn_.

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

51 { return dmb_warn_; }
unsigned dmb_warn_
Active DMB Count (4 bits)
Definition: CSCDDUTrailer.h:66
unsigned CSCDDUTrailer::errorstat ( ) const
inline
unsigned CSCDDUTrailer::reserved ( ) const
inline

Definition at line 53 of file CSCDDUTrailer.h.

References whatever.

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

53 { return whatever; }
unsigned whatever
Definition: CSCDDUTrailer.h:99
void CSCDDUTrailer::setFromBuffer ( uint16_t const *  buf)
inline

Definition at line 29 of file CSCDDUTrailer.h.

References sizeInWords().

Referenced by CSCDDUEventData::unpack_data().

29  {
30  memcpy(this, buf, sizeInWords()*2);
31  }
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:33
void CSCDDUTrailer::setWordCount ( unsigned  wordcount)
inline

Definition at line 48 of file CSCDDUTrailer.h.

References word_count_, and wordcount().

Referenced by CSCDDUEventData::pack().

unsigned wordcount() const
Definition: CSCDDUTrailer.h:47
unsigned word_count_
Definition: CSCDDUTrailer.h:98
static unsigned CSCDDUTrailer::sizeInWords ( )
inlinestatic

Definition at line 33 of file CSCDDUTrailer.h.

Referenced by CSCDDUTrailer(), CSCDDUEventData::pack(), setFromBuffer(), and CSCDDUEventData::unpack_data().

33 {return 12;}
unsigned CSCDDUTrailer::wordcount ( ) const
inline

Definition at line 47 of file CSCDDUTrailer.h.

References word_count_.

Referenced by CSCDDUEventData::check(), cscdqm::EventProcessor::processDDU(), and setWordCount().

47 { return word_count_; }
unsigned word_count_
Definition: CSCDDUTrailer.h:98

Member Data Documentation

unsigned CSCDDUTrailer::cms_directive_0xA
private

constant, should be 1010

Definition at line 101 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::dmb_full_
private

Definition at line 67 of file CSCDDUTrailer.h.

Referenced by dmb_full().

unsigned CSCDDUTrailer::dmb_warn_
private

Active DMB Count (4 bits)

Definition at line 66 of file CSCDDUTrailer.h.

Referenced by dmb_warn().

unsigned CSCDDUTrailer::errorstat_
private

Definition at line 68 of file CSCDDUTrailer.h.

Referenced by errorstat().

unsigned CSCDDUTrailer::trailer2_1
private

should be 8000/8000/FFFF/8000

Definition at line 60 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

unsigned CSCDDUTrailer::trailer2_2
private

Definition at line 61 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

unsigned CSCDDUTrailer::trailer2_3
private

Definition at line 62 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

unsigned CSCDDUTrailer::trailer2_4
private

Definition at line 63 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

unsigned CSCDDUTrailer::whatever
private

Definition at line 99 of file CSCDDUTrailer.h.

Referenced by reserved().

unsigned CSCDDUTrailer::word1
private

Definition at line 85 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word2
private

Definition at line 86 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word3
private

Definition at line 87 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word4
private

Definition at line 88 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word5
private

Definition at line 90 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word6
private

Definition at line 91 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word7
private

Definition at line 92 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word8
private

Definition at line 93 of file CSCDDUTrailer.h.

unsigned CSCDDUTrailer::word_count_
private

in 64-bit words DDU_WC = (6 + 25*N_ts*nCFEB + 3*nDMB)

Definition at line 98 of file CSCDDUTrailer.h.

Referenced by setWordCount(), and wordcount().