CMS 3D CMS Logo

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 ()
 Default constructor. More...
 
 L1GctHfBitCountsLut (const L1GctHfBitCountsLut &lut)
 Copy constructor. More...
 
 L1GctHfBitCountsLut (const L1GctHfEtSumsLut::hfLutType &type)
 Constructor for use with emulator - which type of Lut? More...
 
L1GctHfEtSumsLut::hfLutType lutType () const
 Return the type of Lut. More...
 
L1GctHfBitCountsLut operator= (const L1GctHfBitCountsLut &lut)
 Overload = operator. More...
 
 ~L1GctHfBitCountsLut () override
 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

uint16_t value (const uint16_t lutAddress) const override
 
- 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 19 of file L1GctHfBitCountsLut.h.

Constructor & Destructor Documentation

◆ L1GctHfBitCountsLut() [1/3]

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

Constructor for use with emulator - which type of Lut?

Definition at line 7 of file L1GctHfBitCountsLut.cc.

9  // No setup required
10  m_setupOk = true;
11 }

References L1GctLut< 5, 3 >::m_setupOk.

◆ L1GctHfBitCountsLut() [2/3]

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( )

Default constructor.

Definition at line 13 of file L1GctHfBitCountsLut.cc.

14  // No setup required
15  m_setupOk = true;
16 }

References L1GctLut< 5, 3 >::m_setupOk.

◆ L1GctHfBitCountsLut() [3/3]

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfBitCountsLut lut)

Copy constructor.

Definition at line 18 of file L1GctHfBitCountsLut.cc.

20  // No setup required
21  m_setupOk = true;
22 }

References L1GctLut< 5, 3 >::m_setupOk.

◆ ~L1GctHfBitCountsLut()

L1GctHfBitCountsLut::~L1GctHfBitCountsLut ( )
override

Destructor.

Definition at line 24 of file L1GctHfBitCountsLut.cc.

24 {}

Member Function Documentation

◆ getThresholdsGct()

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

Get thresholds.

Definition at line 35 of file L1GctHfBitCountsLut.cc.

35  {
36  std::vector<unsigned> result;
37  // Return "address=data" up to the maximum number of output codes
38  for (unsigned add = 1; add < (1 << NData); add++) {
39  result.push_back(add);
40  }
41  return result;
42 }

References PVValHelper::add(), NData, and mps_fire::result.

◆ lutType()

L1GctHfEtSumsLut::hfLutType L1GctHfBitCountsLut::lutType ( ) const
inline

Return the type of Lut.

Definition at line 42 of file L1GctHfBitCountsLut.h.

42 { return m_lutType; }

References m_lutType.

◆ operator=()

L1GctHfBitCountsLut L1GctHfBitCountsLut::operator= ( const L1GctHfBitCountsLut lut)

Overload = operator.

Definition at line 44 of file L1GctHfBitCountsLut.cc.

44  {
45  const L1GctHfBitCountsLut& temp(lut);
46  return temp;
47 }

References groupFilesInBlocks::temp.

◆ value()

uint16_t L1GctHfBitCountsLut::value ( const uint16_t  lutAddress) const
overrideprotectedvirtual

Implements L1GctLut< 5, 3 >.

Definition at line 26 of file L1GctHfBitCountsLut.cc.

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

References NData.

Referenced by average.Average::average().

Friends And Related Function Documentation

◆ operator<<

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

Overload << operator.

Definition at line 49 of file L1GctHfBitCountsLut.cc.

49  {
50  os << "===L1GctHfBitCountsLut===" << std::endl;
51  os << "\n===Lookup table contents===\n" << std::endl;
53  os << *temp;
54  return os;
55 }

Member Data Documentation

◆ m_lutType

L1GctHfEtSumsLut::hfLutType L1GctHfBitCountsLut::m_lutType
private

Definition at line 51 of file L1GctHfBitCountsLut.h.

Referenced by lutType().

◆ NAddress

const int L1GctHfBitCountsLut::NAddress = 5
static

Definition at line 24 of file L1GctHfBitCountsLut.h.

◆ NData

const int L1GctHfBitCountsLut::NData = 3
static

Definition at line 24 of file L1GctHfBitCountsLut.h.

Referenced by getThresholdsGct(), and value().

L1GctHfBitCountsLut::m_lutType
L1GctHfEtSumsLut::hfLutType m_lutType
Definition: L1GctHfBitCountsLut.h:51
L1GctHfBitCountsLut::NData
static const int NData
Definition: L1GctHfBitCountsLut.h:24
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1GctLut< 5, 3 >::m_setupOk
bool m_setupOk
Definition: L1GctLut.h:77
L1GctHfBitCountsLut::lutType
L1GctHfEtSumsLut::hfLutType lutType() const
Return the type of Lut.
Definition: L1GctHfBitCountsLut.h:42
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
PVValHelper::add
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
Definition: PVValidationHelpers.cc:12
L1GctLut
Base class for LookUp Tables.
Definition: L1GctLut.h:19
mps_fire.result
result
Definition: mps_fire.py:311
L1GctHfBitCountsLut
LUT for compression of HF feature bit counts to output format.
Definition: L1GctHfBitCountsLut.h:19