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:
17  void readFromDBS(std::string& ptLUT);
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
L1MuCSCPtLut::pt
unsigned short pt(unsigned long addr) const
Definition: L1MuCSCPtLut.h:19
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
L1MuCSCPtLut::L1MuCSCPtLut
L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:33
generateTowerEtThresholdLUT.addr
addr
Definition: generateTowerEtThresholdLUT.py:57
CSCTFConfigProducer
Definition: CSCTFConfigProducer.h:19
L1MuCSCPtLut::~L1MuCSCPtLut
~L1MuCSCPtLut(void)
Definition: L1MuCSCPtLut.h:35
L1MuCSCPtLut::lut
const unsigned short * lut(void) const
Definition: L1MuCSCPtLut.h:26
createfilelist.int
int
Definition: createfilelist.py:10
Serializable.h
L1MuCSCPtLut::L1MuCSCPtLut
L1MuCSCPtLut(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:34
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1MuCSCPtLut::operator=
L1MuCSCPtLut & operator=(const L1MuCSCPtLut &lut)
Definition: L1MuCSCPtLut.h:28
L1MuCSCPtLut
Definition: L1MuCSCPtLut.h:11
L1MuCSCPtLut::pt_lut
unsigned short pt_lut[1<< 21]
Definition: L1MuCSCPtLut.h:13
L1MuCSCPtLut::readFromDBS
void readFromDBS(std::string &ptLUT)
Definition: L1MuCSCPtLut.cc:7