CMS 3D CMS Logo

L1MuCSCPtLut.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1MuCSCPtLut_h
2 #define L1TObjects_L1MuCSCPtLut_h
3 
5 
6 #include <string>
7 #include <cstring>
8 
10 
11 class L1MuCSCPtLut {
12 private:
13  unsigned short pt_lut[1 << 21];
14  friend class CSCTFConfigProducer;
15 
16 public:
18 
19  unsigned short pt(unsigned long addr) const throw() {
20  if (addr < (1 << 21))
21  return pt_lut[(unsigned int)addr];
22  else
23  return 0;
24  }
25 
26  const unsigned short* lut(void) const throw() { return pt_lut; }
27 
29  memcpy(pt_lut, lut.pt_lut, sizeof(pt_lut));
30  return *this;
31  }
32 
33  L1MuCSCPtLut(void) { bzero(pt_lut, sizeof(pt_lut)); }
34  L1MuCSCPtLut(const L1MuCSCPtLut& lut) { memcpy(pt_lut, lut.pt_lut, sizeof(pt_lut)); }
35  ~L1MuCSCPtLut(void) {}
36 
38 };
39 
40 #endif
const ap_uint< BITSPT > ptLUT[2251]
Definition: TPSLUTs.h:18
L1MuCSCPtLut(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:34
L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:33
unsigned short pt(unsigned long addr) const
Definition: L1MuCSCPtLut.h:19
void readFromDBS(std::string &ptLUT)
Definition: L1MuCSCPtLut.cc:7
unsigned short pt_lut[1<< 21]
Definition: L1MuCSCPtLut.h:13
~L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:35
#define COND_SERIALIZABLE
Definition: Serializable.h:39
const unsigned short * lut(void) const
Definition: L1MuCSCPtLut.h:26
L1MuCSCPtLut & operator=(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:28