CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
CSCBadCFEBWord Class Reference

#include <CSCBadCFEBWord.h>

Public Member Functions

bool check () const
 make sure it really does start with a "B" More...
 
unsigned data () const
 
bool isBad () const
 

Private Attributes

unsigned short b_: 4
 
unsigned short code_: 3
 
unsigned short word1_: 4
 
unsigned short word2_: 4
 
unsigned short zero_: 1
 

Friends

std::ostream & operator<< (std::ostream &os, const CSCBadCFEBWord &)
 

Detailed Description

When a time slice is bad, it only has four words, and they all start with "B"

Definition at line 9 of file CSCBadCFEBWord.h.

Member Function Documentation

◆ check()

bool CSCBadCFEBWord::check ( ) const
inline

make sure it really does start with a "B"

Definition at line 12 of file CSCBadCFEBWord.h.

12 { return b_ == 0xb; }

References b_.

Referenced by CSCBadCFEBTimeSlice::check().

◆ data()

unsigned CSCBadCFEBWord::data ( ) const
inline

Definition at line 15 of file CSCBadCFEBWord.h.

15 { return (word1_ + (word2_ << 4) + (code_ << 9) + (b_ << 12)); }

References b_, code_, word1_, and word2_.

Referenced by CSCCFEBData::CSCCFEBData().

◆ isBad()

bool CSCBadCFEBWord::isBad ( ) const
inline

Definition at line 13 of file CSCBadCFEBWord.h.

13 { return true; }

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CSCBadCFEBWord word 
)
friend

Definition at line 4 of file CSCBadCFEBWord.cc.

4  {
5  if (!word.check())
6  os << "Even the Bad CFEB word is bad! Sheesh!" << std::endl;
7  else {
8  switch (word.code_) {
9  case 1:
10  os << "CFEB: SCA Capacitors Full block " << word.word2_ << " FIFO1 count (4-bit) " << word.word1_ << std::endl;
11  break;
12  case 2:
13  os << "CFEB: FPGA FIFO Full FIFO3 count (4-bit) " << word.word2_ << " FIFO1 count (4-bit) " << word.word1_
14  << std::endl;
15  break;
16  case 5:
17  os << "CFEB: DMB FIFO Full " << std::endl;
18  break;
19  case 6:
20  os << "CFEB: DMB FPGA FIFO Full GFIFO count (4-bit)" << word.word2_ << " LFIFO count (4-bit) " << word.word1_
21  << std::endl;
22  break;
23  default:
24  os << "Undefined CFEB error" << std::endl;
25  break;
26  }
27  }
28  return os;
29 }

Member Data Documentation

◆ b_

unsigned short CSCBadCFEBWord::b_
private

Definition at line 22 of file CSCBadCFEBWord.h.

Referenced by check(), and data().

◆ code_

unsigned short CSCBadCFEBWord::code_
private

Definition at line 21 of file CSCBadCFEBWord.h.

Referenced by data().

◆ word1_

unsigned short CSCBadCFEBWord::word1_
private

Definition at line 18 of file CSCBadCFEBWord.h.

Referenced by data().

◆ word2_

unsigned short CSCBadCFEBWord::word2_
private

Definition at line 19 of file CSCBadCFEBWord.h.

Referenced by data().

◆ zero_

unsigned short CSCBadCFEBWord::zero_
private

Definition at line 20 of file CSCBadCFEBWord.h.

CSCBadCFEBWord::code_
unsigned short code_
Definition: CSCBadCFEBWord.h:21
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
CSCBadCFEBWord::word1_
unsigned short word1_
Definition: CSCBadCFEBWord.h:18
CSCBadCFEBWord::b_
unsigned short b_
Definition: CSCBadCFEBWord.h:22
CSCBadCFEBWord::word2_
unsigned short word2_
Definition: CSCBadCFEBWord.h:19