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 12 of file CSCDDUTrailer.h.

Constructor & Destructor Documentation

◆ CSCDDUTrailer() [1/2]

CSCDDUTrailer::CSCDDUTrailer ( )
inline

Definition at line 14 of file CSCDDUTrailer.h.

14  {
15  bzero(this, sizeInWords() * 2);
16  trailer2_1 = trailer2_2 = trailer2_4 = 0x8000;
17  trailer2_3 = 0xFFFF;
18  }

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

◆ CSCDDUTrailer() [2/2]

CSCDDUTrailer::CSCDDUTrailer ( const CSCDDUStatusDigi digi)
inline

Definition at line 19 of file CSCDDUTrailer.h.

19 { memcpy(this, digi.trailer(), sizeInWords() * 2); }

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

Member Function Documentation

◆ check()

bool CSCDDUTrailer::check ( ) const
inline

Definition at line 25 of file CSCDDUTrailer.h.

25  {
26  //std::cout << std:: hex << "DDUTRAILER CHECK " << trailer2_1 << " "
27  // << trailer2_2 << " " << trailer2_3 << " "
28  // << trailer2_4 << std:: dec << std::endl;
29  return trailer2_1 == 0x8000 && trailer2_2 == 0x8000 && trailer2_3 == 0xFFFF && trailer2_4 == 0x8000;
30  }

References trailer2_1, trailer2_2, trailer2_3, and trailer2_4.

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

◆ data()

unsigned short* CSCDDUTrailer::data ( )
inline

Definition at line 32 of file CSCDDUTrailer.h.

32 { return (unsigned short*)this; }

Referenced by CSCDDUEventData::pack().

◆ dmb_full()

unsigned CSCDDUTrailer::dmb_full ( ) const
inline

Definition at line 42 of file CSCDDUTrailer.h.

42 { return dmb_full_; }

References dmb_full_.

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

◆ dmb_warn()

unsigned CSCDDUTrailer::dmb_warn ( ) const
inline

Definition at line 41 of file CSCDDUTrailer.h.

41 { return dmb_warn_; }

References dmb_warn_.

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

◆ errorstat()

unsigned CSCDDUTrailer::errorstat ( ) const
inline

◆ reserved()

unsigned CSCDDUTrailer::reserved ( ) const
inline

Definition at line 43 of file CSCDDUTrailer.h.

43 { return whatever; }

References whatever.

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

◆ setFromBuffer()

void CSCDDUTrailer::setFromBuffer ( uint16_t const *  buf)
inline

Definition at line 21 of file CSCDDUTrailer.h.

21 { memcpy(this, buf, sizeInWords() * 2); }

References visDQMUpload::buf, and sizeInWords().

Referenced by CSCDDUEventData::unpack_data().

◆ setWordCount()

void CSCDDUTrailer::setWordCount ( unsigned  wordcount)
inline

Definition at line 38 of file CSCDDUTrailer.h.

References word_count_, and wordcount().

Referenced by CSCDDUEventData::pack().

◆ sizeInWords()

static unsigned CSCDDUTrailer::sizeInWords ( )
inlinestatic

Definition at line 23 of file CSCDDUTrailer.h.

23 { return 12; }

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

◆ wordcount()

unsigned CSCDDUTrailer::wordcount ( ) const
inline

Definition at line 37 of file CSCDDUTrailer.h.

37 { return word_count_; }

References word_count_.

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

Member Data Documentation

◆ cms_directive_0xA

unsigned CSCDDUTrailer::cms_directive_0xA
private

constant, should be 1010

Definition at line 87 of file CSCDDUTrailer.h.

◆ dmb_full_

unsigned CSCDDUTrailer::dmb_full_
private

Definition at line 54 of file CSCDDUTrailer.h.

Referenced by dmb_full().

◆ dmb_warn_

unsigned CSCDDUTrailer::dmb_warn_
private

Active DMB Count (4 bits)

Definition at line 53 of file CSCDDUTrailer.h.

Referenced by dmb_warn().

◆ errorstat_

unsigned CSCDDUTrailer::errorstat_
private

Definition at line 55 of file CSCDDUTrailer.h.

Referenced by errorstat().

◆ trailer2_1

unsigned CSCDDUTrailer::trailer2_1
private

should be 8000/8000/FFFF/8000

Definition at line 47 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

◆ trailer2_2

unsigned CSCDDUTrailer::trailer2_2
private

Definition at line 48 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

◆ trailer2_3

unsigned CSCDDUTrailer::trailer2_3
private

Definition at line 49 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

◆ trailer2_4

unsigned CSCDDUTrailer::trailer2_4
private

Definition at line 50 of file CSCDDUTrailer.h.

Referenced by check(), and CSCDDUTrailer().

◆ whatever

unsigned CSCDDUTrailer::whatever
private

Definition at line 85 of file CSCDDUTrailer.h.

Referenced by reserved().

◆ word1

unsigned CSCDDUTrailer::word1
private

Definition at line 72 of file CSCDDUTrailer.h.

◆ word2

unsigned CSCDDUTrailer::word2
private

Definition at line 73 of file CSCDDUTrailer.h.

◆ word3

unsigned CSCDDUTrailer::word3
private

Definition at line 74 of file CSCDDUTrailer.h.

◆ word4

unsigned CSCDDUTrailer::word4
private

Definition at line 75 of file CSCDDUTrailer.h.

◆ word5

unsigned CSCDDUTrailer::word5
private

Definition at line 77 of file CSCDDUTrailer.h.

◆ word6

unsigned CSCDDUTrailer::word6
private

Definition at line 78 of file CSCDDUTrailer.h.

◆ word7

unsigned CSCDDUTrailer::word7
private

Definition at line 79 of file CSCDDUTrailer.h.

◆ word8

unsigned CSCDDUTrailer::word8
private

Definition at line 80 of file CSCDDUTrailer.h.

◆ word_count_

unsigned CSCDDUTrailer::word_count_
private

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

Definition at line 84 of file CSCDDUTrailer.h.

Referenced by setWordCount(), and wordcount().

CSCDDUTrailer::trailer2_1
unsigned trailer2_1
should be 8000/8000/FFFF/8000
Definition: CSCDDUTrailer.h:47
CSCDDUTrailer::word_count_
unsigned word_count_
Definition: CSCDDUTrailer.h:84
CSCDDUTrailer::trailer2_4
unsigned trailer2_4
Definition: CSCDDUTrailer.h:50
CSCDDUStatusDigi::trailer
const uint16_t * trailer() const
Definition: CSCDDUStatusDigi.h:25
CSCDDUTrailer::whatever
unsigned whatever
Definition: CSCDDUTrailer.h:85
CSCDDUTrailer::trailer2_2
unsigned trailer2_2
Definition: CSCDDUTrailer.h:48
visDQMUpload.buf
buf
Definition: visDQMUpload.py:154
CSCDDUTrailer::sizeInWords
static unsigned sizeInWords()
Definition: CSCDDUTrailer.h:23
CSCDDUTrailer::dmb_full_
unsigned dmb_full_
Definition: CSCDDUTrailer.h:54
CSCDDUTrailer::trailer2_3
unsigned trailer2_3
Definition: CSCDDUTrailer.h:49
CSCDDUTrailer::errorstat_
unsigned errorstat_
Definition: CSCDDUTrailer.h:55
CSCDDUTrailer::wordcount
unsigned wordcount() const
Definition: CSCDDUTrailer.h:37
CSCDDUTrailer::dmb_warn_
unsigned dmb_warn_
Active DMB Count (4 bits)
Definition: CSCDDUTrailer.h:53