CMS 3D CMS Logo

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