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 <string.h>
8 
10 
11 class L1MuCSCPtLut {
12 private:
13  unsigned short pt_lut[1<<21];
14  friend class CSCTFConfigProducer;
15 
16 public:
17 
18  void readFromDBS(std::string& ptLUT);
19 
20  unsigned short pt(unsigned long addr) const throw() {
21  if( addr<(1<<21) ) return pt_lut[(unsigned int)addr];
22  else return 0;
23  }
24 
25  const unsigned short* lut(void) const throw() { return pt_lut; }
26 
27  L1MuCSCPtLut& operator=(const L1MuCSCPtLut& lut){ memcpy(pt_lut,lut.pt_lut,sizeof(pt_lut)); return *this; }
28 
29  L1MuCSCPtLut(void){ bzero(pt_lut,sizeof(pt_lut)); }
30  L1MuCSCPtLut(const L1MuCSCPtLut& lut){ memcpy(pt_lut,lut.pt_lut,sizeof(pt_lut)); }
31  ~L1MuCSCPtLut(void){}
32 
33 
35 };
36 
37 #endif
L1MuCSCPtLut(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:30
L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:29
const unsigned short * lut(void) const
Definition: L1MuCSCPtLut.h:25
void readFromDBS(std::string &ptLUT)
Definition: L1MuCSCPtLut.cc:7
unsigned short pt_lut[1<< 21]
Definition: L1MuCSCPtLut.h:13
~L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:31
unsigned short pt(unsigned long addr) const
Definition: L1MuCSCPtLut.h:20
#define COND_SERIALIZABLE
Definition: Serializable.h:38
L1MuCSCPtLut & operator=(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:27