test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1GctHfBitCountsLut.cc
Go to the documentation of this file.
2 
3 //DEFINE STATICS
5 const int L1GctHfBitCountsLut::NData =3;
6 
8  L1GctLut<NAddress,NData>(),
9  m_lutType(type)
10 {
11  // No setup required
12  m_setupOk = true;
13 }
14 
16  L1GctLut<NAddress,NData>(),
17  m_lutType()
18 {
19  // No setup required
20  m_setupOk = true;
21 }
22 
24  L1GctLut<NAddress,NData>(),
25  m_lutType(lut.lutType())
26 {
27  // No setup required
28  m_setupOk = true;
29 }
30 
32 {
33 }
34 
35 uint16_t L1GctHfBitCountsLut::value (const uint16_t lutAddress) const
36 {
37  // Return "address=data" up to the maximum number of output codes
38  const int maxOutput = ((1<<NData)-1);
39  if (lutAddress > maxOutput) return maxOutput;
40  else return (lutAddress & maxOutput);
41 }
42 
43 std::vector<unsigned> L1GctHfBitCountsLut::getThresholdsGct() const
44 {
45  std::vector<unsigned> result;
46  // Return "address=data" up to the maximum number of output codes
47  for (unsigned add=1; add<(1<<NData); add++) {
48  result.push_back(add);
49  }
50  return result;
51 }
52 
54 {
56  return temp;
57 }
58 
59 std::ostream& operator << (std::ostream& os, const L1GctHfBitCountsLut& lut)
60 {
61  os << "===L1GctHfBitCountsLut===" << std::endl;
62  os << "\n===Lookup table contents===\n" << std::endl;
64  os << *temp;
65  return os;
66 }
67 
69 
type
Definition: HCALResponse.h:21
static const int NData
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
Base class for LookUp Tables.
Definition: L1GctLut.h:20
tuple result
Definition: mps_fire.py:83
L1GctHfBitCountsLut operator=(const L1GctHfBitCountsLut &lut)
Overload = operator.
LUT for compression of HF feature bit counts to output format.
L1GctHfBitCountsLut()
Default constructor.
tuple lut
Definition: lumiPlot.py:244
virtual ~L1GctHfBitCountsLut()
Destructor.
static const int NAddress
std::vector< unsigned > getThresholdsGct() const
Get thresholds.
virtual uint16_t value(const uint16_t lutAddress) const