Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EventFilter_CSCRawToDigi_CSCRPCData_h
0002 #define EventFilter_CSCRawToDigi_CSCRPCData_h
0003 
0004 #include <vector>
0005 #ifndef LOCAL_UNPACK
0006 #include <atomic>
0007 #endif
0008 
0009 class CSCRPCDigi;
0010 
0011 class CSCRPCData {
0012 public:
0013   /// default constructor
0014   CSCRPCData(int ntbins = 7);
0015   // length is in 16-bit words
0016   CSCRPCData(const unsigned short *b04buf, int length);
0017 
0018   std::vector<int> BXN() const;
0019   std::vector<CSCRPCDigi> digis() const;
0020   void add(const CSCRPCDigi &);
0021   int sizeInWords() { return size_; }
0022   int nTbins() { return ntbins_; }
0023   void Print() const;
0024   bool check() const { return theData[0] == 0x6b04 && theData[size_ - 1] == 0x6e04; }
0025 
0026   static void setDebug(bool debugValue) { debug = debugValue; }
0027 
0028 private:
0029 #ifdef LOCAL_UNPACK
0030   static bool debug;
0031 #else
0032   static std::atomic<bool> debug;
0033 #endif
0034   int ntbins_;
0035   int size_;
0036   unsigned short theData[2 * 4 * 32 + 2];
0037 };
0038 
0039 #endif