CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
CSCRPCData.h
Go to the documentation of this file.
1 #ifndef EventFilter_CSCRawToDigi_CSCRPCData_h
2 #define EventFilter_CSCRawToDigi_CSCRPCData_h
3 
4 #include <vector>
5 #ifndef LOCAL_UNPACK
6 #include <atomic>
7 #endif
8 
9 class CSCRPCDigi;
10 
11 class CSCRPCData {
12 public:
14  CSCRPCData(int ntbins = 7);
15  // length is in 16-bit words
16  CSCRPCData(const unsigned short *b04buf, int length);
17 
18  std::vector<int> BXN() const;
19  std::vector<CSCRPCDigi> digis() const;
20  void add(const CSCRPCDigi &);
21  int sizeInWords() { return size_; }
22  int nTbins() { return ntbins_; }
23  void Print() const;
24  bool check() const { return theData[0] == 0x6b04 && theData[size_ - 1] == 0x6e04; }
25 
26  static void setDebug(bool debugValue) { debug = debugValue; }
27 
28 private:
29 #ifdef LOCAL_UNPACK
30  static bool debug;
31 #else
32  static std::atomic<bool> debug;
33 #endif
34  int ntbins_;
35  int size_;
36  unsigned short theData[2 * 4 * 32 + 2];
37 };
38 
39 #endif
std::vector< CSCRPCDigi > digis() const
Definition: CSCRPCData.cc:88
int nTbins()
Definition: CSCRPCData.h:22
void Print() const
Definition: CSCRPCData.cc:46
bool check() const
Definition: CSCRPCData.h:24
static std::atomic< bool > debug
Definition: CSCRPCData.h:32
std::vector< int > BXN() const
Definition: CSCRPCData.cc:68
void add(const CSCRPCDigi &)
int sizeInWords()
Definition: CSCRPCData.h:21
CSCRPCData(int ntbins=7)
default constructor
Definition: CSCRPCData.cc:25
unsigned short theData[2 *4 *32+2]
Definition: CSCRPCData.h:36
static void setDebug(bool debugValue)
Definition: CSCRPCData.h:26
int ntbins_
Definition: CSCRPCData.h:34