CMS 3D CMS Logo

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
CSCRPCData::digis
std::vector< CSCRPCDigi > digis() const
Definition: CSCRPCData.cc:88
CSCRPCData::CSCRPCData
CSCRPCData(int ntbins=7)
default constructor
Definition: CSCRPCData.cc:25
CSCRPCData::debug
static std::atomic< bool > debug
Definition: CSCRPCData.h:32
CSCRPCData::setDebug
static void setDebug(bool debugValue)
Definition: CSCRPCData.h:26
CSCRPCData::nTbins
int nTbins()
Definition: CSCRPCData.h:22
CSCRPCData::BXN
std::vector< int > BXN() const
Definition: CSCRPCData.cc:68
CSCRPCData::Print
void Print() const
Definition: CSCRPCData.cc:46
CSCRPCDigi
Definition: CSCRPCDigi.h:15
CSCRPCData::add
void add(const CSCRPCDigi &)
CSCRPCData::theData
unsigned short theData[2 *4 *32+2]
Definition: CSCRPCData.h:36
CSCRPCData::ntbins_
int ntbins_
Definition: CSCRPCData.h:34
CSCRPCData::check
bool check() const
Definition: CSCRPCData.h:24
CSCRPCData::sizeInWords
int sizeInWords()
Definition: CSCRPCData.h:21
CSCRPCData
Definition: CSCRPCData.h:11
CSCRPCData::size_
int size_
Definition: CSCRPCData.h:35