CMS 3D CMS Logo

L1GctHfBitCountsLut Class Reference

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

#include <L1Trigger/GlobalCaloTrigger/interface/L1GctHfBitCountsLut.h>

Inheritance diagram for L1GctHfBitCountsLut:

L1GctLut< L1GctHfLutSetup::kHfCountBits, L1GctHfLutSetup::kHfOutputBits >

List of all members.

Public Member Functions

 L1GctHfBitCountsLut (const L1GctHfBitCountsLut &lut)
 Copy constructor.
 L1GctHfBitCountsLut ()
 Default constructor.
 L1GctHfBitCountsLut (const L1GctHfLutSetup::hfLutType &type)
 Constructor for use with emulator - which type of Lut?
 L1GctHfBitCountsLut (const L1GctHfLutSetup::hfLutType &type, const L1GctHfLutSetup *const fn)
 Constructor for use with emulator - which type of Lut?
const L1GctHfLutSetuplutFunction () const
 Return the Lut function.
L1GctHfLutSetup::hfLutType lutType () const
 Return the type of Lut.
L1GctHfBitCountsLut operator= (const L1GctHfBitCountsLut &lut)
 Overload = operator.
void setFunction (const L1GctHfLutSetup *const fn)
 Set the function.
virtual ~L1GctHfBitCountsLut ()
 Destructor.

Static Public Attributes

static const int NAddress = L1GctHfLutSetup::kHfCountBits
static const int NData = L1GctHfLutSetup::kHfOutputBits

Protected Member Functions

virtual uint16_t value (const uint16_t lutAddress) const

Private Attributes

const L1GctHfLutSetupm_lutFunction
L1GctHfLutSetup::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 21 of file L1GctHfBitCountsLut.h.


Constructor & Destructor Documentation

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfLutSetup::hfLutType type,
const L1GctHfLutSetup *const   fn 
)

Constructor for use with emulator - which type of Lut?

Definition at line 7 of file L1GctHfBitCountsLut.cc.

References L1GctLut< L1GctHfLutSetup::kHfCountBits, L1GctHfLutSetup::kHfOutputBits >::m_setupOk.

00007                                                                                                               :
00008   L1GctLut<NAddress,NData>(),
00009   m_lutFunction(fn),
00010   m_lutType(type)
00011 {
00012   if (fn != 0) m_setupOk = true;
00013 }

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfLutSetup::hfLutType type  ) 

Constructor for use with emulator - which type of Lut?

Definition at line 15 of file L1GctHfBitCountsLut.cc.

00015                                                                              :
00016   L1GctLut<NAddress,NData>(),
00017   m_lutFunction(0),
00018   m_lutType(type)
00019 {
00020 }

L1GctHfBitCountsLut::L1GctHfBitCountsLut (  ) 

Default constructor.

Definition at line 22 of file L1GctHfBitCountsLut.cc.

00022                                          :
00023   L1GctLut<NAddress,NData>(),
00024   m_lutFunction(0),
00025   m_lutType()
00026 {
00027 }

L1GctHfBitCountsLut::L1GctHfBitCountsLut ( const L1GctHfBitCountsLut lut  ) 

Copy constructor.

Definition at line 29 of file L1GctHfBitCountsLut.cc.

00029                                                                        :
00030   L1GctLut<NAddress,NData>(),
00031   m_lutFunction(lut.lutFunction()),
00032   m_lutType(lut.lutType())
00033 {
00034 }

L1GctHfBitCountsLut::~L1GctHfBitCountsLut (  )  [virtual]

Destructor.

Definition at line 36 of file L1GctHfBitCountsLut.cc.

00037 {
00038 }


Member Function Documentation

const L1GctHfLutSetup* L1GctHfBitCountsLut::lutFunction (  )  const [inline]

Return the Lut function.

Definition at line 54 of file L1GctHfBitCountsLut.h.

References m_lutFunction.

Referenced by L1GctGlobalHfSumAlgos::getThresholds().

00054 { return m_lutFunction; }

L1GctHfLutSetup::hfLutType L1GctHfBitCountsLut::lutType (  )  const [inline]

Return the type of Lut.

Definition at line 51 of file L1GctHfBitCountsLut.h.

References m_lutType.

00051 { return m_lutType; }

L1GctHfBitCountsLut L1GctHfBitCountsLut::operator= ( const L1GctHfBitCountsLut lut  ) 

Overload = operator.

Definition at line 40 of file L1GctHfBitCountsLut.cc.

References pyDBSRunClass::temp.

00041 {
00042   L1GctHfBitCountsLut temp(lut);
00043   return temp;
00044 }

void L1GctHfBitCountsLut::setFunction ( const L1GctHfLutSetup *const   fn  )  [inline]

Set the function.

Definition at line 48 of file L1GctHfBitCountsLut.h.

References m_lutFunction, and L1GctLut< L1GctHfLutSetup::kHfCountBits, L1GctHfLutSetup::kHfOutputBits >::m_setupOk.

00048 { if (fn != 0) { m_lutFunction = fn; m_setupOk = true; } }

uint16_t L1GctHfBitCountsLut::value ( const uint16_t  lutAddress  )  const [protected, virtual]

Implements L1GctLut< L1GctHfLutSetup::kHfCountBits, L1GctHfLutSetup::kHfOutputBits >.

Definition at line 65 of file L1GctHfBitCountsLut.cc.

References m_lutFunction, m_lutType, and L1GctHfLutSetup::outputValue().

00066 {
00067   return m_lutFunction->outputValue(m_lutType, lutAddress) ;
00068 }


Friends And Related Function Documentation

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

Overload << operator.

Definition at line 46 of file L1GctHfBitCountsLut.cc.

00047 {
00048   os << "===L1GctHfBitCountsLut===" << std::endl;
00049   std::vector<unsigned> thresholds = lut.m_lutFunction->getThresholds(lut.m_lutType);
00050   std::vector<unsigned>::const_iterator thr = thresholds.begin();
00051   os << "Thresholds are: " << *(thr++);
00052   for ( ; thr != thresholds.end(); thr++) {
00053     os << ", " << *thr;
00054   }
00055   os << std::endl;
00056   os << "\n===Lookup table contents===\n" << std::endl;
00057   const L1GctLut<L1GctHfBitCountsLut::NAddress,L1GctHfBitCountsLut::NData>* temp=&lut;
00058   os << *temp;
00059   return os;
00060 }


Member Data Documentation

const L1GctHfLutSetup* L1GctHfBitCountsLut::m_lutFunction [private]

Definition at line 63 of file L1GctHfBitCountsLut.h.

Referenced by lutFunction(), operator<<(), setFunction(), and value().

L1GctHfLutSetup::hfLutType L1GctHfBitCountsLut::m_lutType [private]

Definition at line 64 of file L1GctHfBitCountsLut.h.

Referenced by lutType(), operator<<(), and value().

const int L1GctHfBitCountsLut::NAddress = L1GctHfLutSetup::kHfCountBits [static]

Definition at line 28 of file L1GctHfBitCountsLut.h.

const int L1GctHfBitCountsLut::NData = L1GctHfLutSetup::kHfOutputBits [static]

Definition at line 28 of file L1GctHfBitCountsLut.h.


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:26:29 2009 for CMSSW by  doxygen 1.5.4