CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | Friends
L1GctHfBitCountsLut Class Reference

LUT for compression of HF feature bit counts to output format. More...

#include <L1GctHfBitCountsLut.h>

Inheritance diagram for L1GctHfBitCountsLut:
L1GctLut< 5, 3 >

Public Member Functions

std::vector< unsigned > getThresholdsGct () const
 Get thresholds. More...
 
 L1GctHfBitCountsLut (const L1GctHfEtSumsLut::hfLutType &type)
 Constructor for use with emulator - which type of Lut? More...
 
 L1GctHfBitCountsLut ()
 Default constructor. More...
 
 L1GctHfBitCountsLut (const L1GctHfBitCountsLut &lut)
 Copy constructor. More...
 
L1GctHfEtSumsLut::hfLutType lutType () const
 Return the type of Lut. More...
 
L1GctHfBitCountsLut operator= (const L1GctHfBitCountsLut &lut)
 Overload = operator. More...
 
virtual ~L1GctHfBitCountsLut ()
 Destructor. More...
 
- Public Member Functions inherited from L1GctLut< 5, 3 >
uint16_t lutValue (const uint16_t lutAddress) const
 Access the look-up table contents for a given Address. More...
 
int operator!= (const L1GctLut< KAddressBits, KDataBits > &rhsLut) const
 Inequality check between look-up tables. More...
 
int operator== (const L1GctLut< KAddressBits, KDataBits > &rhsLut) const
 Equality check between look-up tables. More...
 
uint16_t operator[] (const uint16_t lutAddress) const
 Access the look-up table contents for a given Address. More...
 
void setTerse ()
 
bool setupOk ()
 
void setVerbose ()
 control output messages More...
 
virtual ~L1GctLut ()
 

Static Public Attributes

static const int NAddress =5
 
static const int NData =3
 
- Static Public Attributes inherited from L1GctLut< 5, 3 >
static const uint16_t MAX_ADDRESS_BITMASK
 
static const uint16_t MAX_DATA_BITMASK
 

Protected Member Functions

virtual uint16_t value (const uint16_t lutAddress) const
 
- Protected Member Functions inherited from L1GctLut< 5, 3 >
bool equalityCheck (const L1GctLut< KAddressBits, KDataBits > &c) const
 
 L1GctLut ()
 

Private Attributes

L1GctHfEtSumsLut::hfLutType m_lutType
 

Friends

std::ostream & operator<< (std::ostream &os, const L1GctHfBitCountsLut &lut)
 Overload << operator. More...
 

Additional Inherited Members

- Protected Attributes inherited from L1GctLut< 5, 3 >
bool m_setupOk
 
bool m_verbose
 

Detailed Description

LUT for compression of HF feature bit counts to output format.

Author
Greg Heath
Date
September 2008

Definition at line 20 of file L1GctHfBitCountsLut.h.

Constructor & Destructor Documentation

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfEtSumsLut::hfLutType type)

Constructor for use with emulator - which type of Lut?

Definition at line 7 of file L1GctHfBitCountsLut.cc.

References L1GctLut< 5, 3 >::m_setupOk.

7  :
10 {
11  // No setup required
12  m_setupOk = true;
13 }
type
Definition: HCALResponse.h:22
Base class for LookUp Tables.
Definition: L1GctLut.h:21
L1GctHfEtSumsLut::hfLutType m_lutType
L1GctHfBitCountsLut::L1GctHfBitCountsLut ( )

Default constructor.

Definition at line 15 of file L1GctHfBitCountsLut.cc.

References L1GctLut< 5, 3 >::m_setupOk.

15  :
17  m_lutType()
18 {
19  // No setup required
20  m_setupOk = true;
21 }
Base class for LookUp Tables.
Definition: L1GctLut.h:21
L1GctHfEtSumsLut::hfLutType m_lutType
L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfBitCountsLut lut)

Copy constructor.

Definition at line 23 of file L1GctHfBitCountsLut.cc.

References L1GctLut< 5, 3 >::m_setupOk.

23  :
25  m_lutType(lut.lutType())
26 {
27  // No setup required
28  m_setupOk = true;
29 }
L1GctHfEtSumsLut::hfLutType lutType() const
Return the type of Lut.
Base class for LookUp Tables.
Definition: L1GctLut.h:21
L1GctHfEtSumsLut::hfLutType m_lutType
L1GctHfBitCountsLut::~L1GctHfBitCountsLut ( )
virtual

Destructor.

Definition at line 31 of file L1GctHfBitCountsLut.cc.

32 {
33 }

Member Function Documentation

std::vector< unsigned > L1GctHfBitCountsLut::getThresholdsGct ( ) const

Get thresholds.

Definition at line 43 of file L1GctHfBitCountsLut.cc.

References Clusterizer1DCommons::add(), NData, and query::result.

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 }
static const int NData
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
tuple result
Definition: query.py:137
L1GctHfEtSumsLut::hfLutType L1GctHfBitCountsLut::lutType ( ) const
inline

Return the type of Lut.

Definition at line 44 of file L1GctHfBitCountsLut.h.

References m_lutType.

44 { return m_lutType; }
L1GctHfEtSumsLut::hfLutType m_lutType
L1GctHfBitCountsLut L1GctHfBitCountsLut::operator= ( const L1GctHfBitCountsLut lut)

Overload = operator.

Definition at line 53 of file L1GctHfBitCountsLut.cc.

References groupFilesInBlocks::temp.

54 {
56  return temp;
57 }
LUT for compression of HF feature bit counts to output format.
uint16_t L1GctHfBitCountsLut::value ( const uint16_t  lutAddress) const
protectedvirtual

Implements L1GctLut< 5, 3 >.

Definition at line 35 of file L1GctHfBitCountsLut.cc.

References NData.

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 }
static const int NData

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const L1GctHfBitCountsLut lut 
)
friend

Overload << operator.

Definition at line 59 of file L1GctHfBitCountsLut.cc.

60 {
61  os << "===L1GctHfBitCountsLut===" << std::endl;
62  os << "\n===Lookup table contents===\n" << std::endl;
64  os << *temp;
65  return os;
66 }
Base class for LookUp Tables.
Definition: L1GctLut.h:21
tuple lut
Definition: lumiPlot.py:244

Member Data Documentation

L1GctHfEtSumsLut::hfLutType L1GctHfBitCountsLut::m_lutType
private

Definition at line 56 of file L1GctHfBitCountsLut.h.

Referenced by lutType().

const int L1GctHfBitCountsLut::NAddress =5
static

Definition at line 26 of file L1GctHfBitCountsLut.h.

const int L1GctHfBitCountsLut::NData =3
static

Definition at line 26 of file L1GctHfBitCountsLut.h.

Referenced by getThresholdsGct(), and value().