Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:14:36

0001 #ifndef EventFilter_CSCRawToDigi_CSCBadCFEBWord_h
0002 #define EventFilter_CSCRawToDigi_CSCBadCFEBWord_h
0003 
0004 /**
0005  * When a time slice is bad, it only has four words, and they all start with "B"
0006  */
0007 #include <iosfwd>
0008 
0009 class CSCBadCFEBWord {
0010 public:
0011   /// make sure it really does start with a "B"
0012   bool check() const { return b_ == 0xb; }
0013   bool isBad() const { return true; }
0014   friend std::ostream &operator<<(std::ostream &os, const CSCBadCFEBWord &);
0015   unsigned data() const { return (word1_ + (word2_ << 4) + (code_ << 9) + (b_ << 12)); }
0016 
0017 private:
0018   unsigned short word1_ : 4;
0019   unsigned short word2_ : 4;
0020   unsigned short zero_ : 1;
0021   unsigned short code_ : 3;
0022   unsigned short b_ : 4;
0023 };
0024 
0025 #endif