CMS 3D CMS Logo

Public Member Functions | Public Attributes | 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 >

List of all members.

Public Member Functions

std::vector< unsigned > getThresholdsGct () const
 Get thresholds.
 L1GctHfBitCountsLut (const L1GctHfBitCountsLut &lut)
 Copy constructor.
 L1GctHfBitCountsLut ()
 Default constructor.
 L1GctHfBitCountsLut (const L1GctHfEtSumsLut::hfLutType &type)
 Constructor for use with emulator - which type of Lut?
L1GctHfEtSumsLut::hfLutType lutType () const
 Return the type of Lut.
L1GctHfBitCountsLut operator= (const L1GctHfBitCountsLut &lut)
 Overload = operator.
virtual ~L1GctHfBitCountsLut ()
 Destructor.

Public Attributes

static const int NData = 3

Static Public Attributes

static const int NAddress = 5

Protected Member Functions

virtual uint16_t value (const uint16_t lutAddress) const

Private Attributes

L1GctHfEtSumsLut::hfLutType m_lutType

Friends

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

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.

                                                                              :
  L1GctLut<NAddress,NData>(),
  m_lutType(type)
{
  // No setup required
  m_setupOk = true;
}
L1GctHfBitCountsLut::L1GctHfBitCountsLut ( )

Default constructor.

Definition at line 15 of file L1GctHfBitCountsLut.cc.

References L1GctLut< 5, 3 >::m_setupOk.

                                         :
  L1GctLut<NAddress,NData>(),
  m_lutType()
{
  // No setup required
  m_setupOk = true;
}
L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfBitCountsLut lut)

Copy constructor.

Definition at line 23 of file L1GctHfBitCountsLut.cc.

References L1GctLut< 5, 3 >::m_setupOk.

                                                                       :
  L1GctLut<NAddress,NData>(),
  m_lutType(lut.lutType())
{
  // No setup required
  m_setupOk = true;
}
L1GctHfBitCountsLut::~L1GctHfBitCountsLut ( ) [virtual]

Destructor.

Definition at line 31 of file L1GctHfBitCountsLut.cc.

{
}

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.

{
  std::vector<unsigned> result;
  // Return "address=data" up to the maximum number of output codes
  for (unsigned add=1; add<(1<<NData); add++) {
    result.push_back(add);
  }
  return result;
}
L1GctHfEtSumsLut::hfLutType L1GctHfBitCountsLut::lutType ( ) const [inline]

Return the type of Lut.

Definition at line 44 of file L1GctHfBitCountsLut.h.

References m_lutType.

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

Overload = operator.

Definition at line 53 of file L1GctHfBitCountsLut.cc.

References groupFilesInBlocks::temp.

{
  L1GctHfBitCountsLut temp(lut);
  return temp;
}
uint16_t L1GctHfBitCountsLut::value ( const uint16_t  lutAddress) const [protected, virtual]

Implements L1GctLut< 5, 3 >.

Definition at line 35 of file L1GctHfBitCountsLut.cc.

References NData.

{
  // Return "address=data" up to the maximum number of output codes
  const int maxOutput = ((1<<NData)-1);
  if (lutAddress > maxOutput) return maxOutput;
  else return (lutAddress & maxOutput);
}

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.

{
  os << "===L1GctHfBitCountsLut===" << std::endl;
  os << "\n===Lookup table contents===\n" << std::endl;
  const L1GctLut<L1GctHfBitCountsLut::NAddress,L1GctHfBitCountsLut::NData>* temp=&lut;
  os << *temp;
  return os;
}

Member Data Documentation

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.

Definition at line 26 of file L1GctHfBitCountsLut.h.

Referenced by getThresholdsGct(), and value().