CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1MuCSCPtLut.h
Go to the documentation of this file.
1 #ifndef L1TObjects_L1MuCSCPtLut_h
2 #define L1TObjects_L1MuCSCPtLut_h
3 
4 #include <string>
5 #include <string.h>
6 
8 
9 class L1MuCSCPtLut {
10 private:
11  unsigned short pt_lut[1<<21];
12  friend class CSCTFConfigProducer;
13 
14 public:
15 
16  void readFromDBS(std::string& ptLUT);
17 
18  unsigned short pt(unsigned long addr) const throw() {
19  if( addr<(1<<21) ) return pt_lut[(unsigned int)addr];
20  else return 0;
21  }
22 
23  const unsigned short* lut(void) const throw() { return pt_lut; }
24 
25  L1MuCSCPtLut& operator=(const L1MuCSCPtLut& lut){ memcpy(pt_lut,lut.pt_lut,sizeof(pt_lut)); return *this; }
26 
27  L1MuCSCPtLut(void){ bzero(pt_lut,sizeof(pt_lut)); }
28  L1MuCSCPtLut(const L1MuCSCPtLut& lut){ memcpy(pt_lut,lut.pt_lut,sizeof(pt_lut)); }
29  ~L1MuCSCPtLut(void){}
30 
31 };
32 
33 #endif
L1MuCSCPtLut(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:28
L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:27
const unsigned short * lut(void) const
Definition: L1MuCSCPtLut.h:23
void readFromDBS(std::string &ptLUT)
Definition: L1MuCSCPtLut.cc:7
unsigned short pt_lut[1<< 21]
Definition: L1MuCSCPtLut.h:11
~L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:29
unsigned short pt(unsigned long addr) const
Definition: L1MuCSCPtLut.h:18
L1MuCSCPtLut & operator=(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:25