test
CMS 3D CMS Logo

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

#include <MicroGMTExtrapolationLUT.h>

Inheritance diagram for l1t::MicroGMTExtrapolationLUT:
l1t::MicroGMTLUT

Public Member Functions

int hashInput (int angle, int pt) const
 
int lookup (int angle, int pt) const
 
 MicroGMTExtrapolationLUT (const edm::ParameterSet &iConfig, const std::string &setName, int type)
 
 MicroGMTExtrapolationLUT (const edm::ParameterSet &iConfig, const char *setName, int type)
 
void unHashInput (int input, int &angle, int &pt) const
 
virtual ~MicroGMTExtrapolationLUT ()
 

Private Member Functions

void getParameters (const edm::ParameterSet &iConfig, const char *setName, int type)
 
- Private Member Functions inherited from l1t::MicroGMTLUT
int checkedInput (unsigned in, unsigned maxWidth) const
 
void contentsToStream (std::stringstream &stream)
 
void headerToStream (std::stringstream &stream) const
 
void initialize ()
 
void load (const std::string &inFileName)
 
virtual int lookupPacked (int input) const
 
 MicroGMTLUT ()
 
void save (std::ofstream &output)
 
virtual ~MicroGMTLUT ()
 

Private Attributes

int m_etaRedInWidth
 
int m_etaRedMask
 
int m_ptRedInWidth
 
int m_ptRedMask
 
- Private Attributes inherited from l1t::MicroGMTLUT
std::map< int, int > m_contents
 
std::string m_fname
 
bool m_initialized
 
std::vector
< MicroGMTConfiguration::input_t
m_inputs
 
unsigned m_outWidth
 
unsigned m_totalInWidth
 

Detailed Description

Definition at line 10 of file MicroGMTExtrapolationLUT.h.

Constructor & Destructor Documentation

l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT ( const edm::ParameterSet iConfig,
const std::string &  setName,
int  type 
)

Definition at line 3 of file MicroGMTExtrapolationLUT.cc.

References getParameters().

3  {
4  getParameters(iConfig, setName.c_str(), type);
5 }
type
Definition: HCALResponse.h:21
void getParameters(const edm::ParameterSet &iConfig, const char *setName, int type)
l1t::MicroGMTExtrapolationLUT::MicroGMTExtrapolationLUT ( const edm::ParameterSet iConfig,
const char *  setName,
int  type 
)

Definition at line 7 of file MicroGMTExtrapolationLUT.cc.

References cfg-viewer::getParameters().

7  {
8  getParameters(iConfig, setName, type);
9 }
type
Definition: HCALResponse.h:21
void getParameters(const edm::ParameterSet &iConfig, const char *setName, int type)
l1t::MicroGMTExtrapolationLUT::~MicroGMTExtrapolationLUT ( )
virtual

Definition at line 32 of file MicroGMTExtrapolationLUT.cc.

33 {
34 
35 }

Member Function Documentation

void l1t::MicroGMTExtrapolationLUT::getParameters ( const edm::ParameterSet iConfig,
const char *  setName,
int  type 
)
private

Definition at line 12 of file MicroGMTExtrapolationLUT.cc.

References HDQMDatabaseProducer::config, l1t::MicroGMTConfiguration::ETA, edm::ParameterSet::getParameter(), svgfig::load(), l1t::MicroGMTConfiguration::PT, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by MicroGMTExtrapolationLUT().

12  {
14 
15  m_etaRedInWidth = config.getParameter<int>("etaAbsRed_in_width");
16  m_ptRedInWidth = config.getParameter<int>("pTred_in_width");
17 
18  m_totalInWidth = m_ptRedInWidth + m_etaRedInWidth;
19 
20  m_ptRedMask = (1 << m_ptRedInWidth) - 1;
22 
23  std::string m_fname = config.getParameter<std::string>("filename");
24  if (m_fname != std::string("")) {
25  load(m_fname);
26  }
29 }
T getParameter(std::string const &) const
unsigned m_totalInWidth
Definition: MicroGMTLUT.h:35
std::vector< MicroGMTConfiguration::input_t > m_inputs
Definition: MicroGMTLUT.h:37
std::string m_fname
Definition: MicroGMTLUT.h:39
void load(const std::string &inFileName)
Definition: MicroGMTLUT.cc:18
int l1t::MicroGMTExtrapolationLUT::hashInput ( int  angle,
int  pt 
) const

Definition at line 52 of file MicroGMTExtrapolationLUT.cc.

References EnergyCorrector::pt, and query::result.

53 {
54  int result = 0;
55  result += eta << m_ptRedInWidth;
56  result += pt;
57  return result;
58 }
tuple result
Definition: query.py:137
int l1t::MicroGMTExtrapolationLUT::lookup ( int  angle,
int  pt 
) const

Definition at line 39 of file MicroGMTExtrapolationLUT.cc.

References query::result.

40 {
41  // normalize these two to the same scale and then calculate?
42  if (m_initialized) {
43  // unsigned eta_twocomp = MicroGMTConfiguration::getTwosComp(eta, m_etaRedInWidth);
45  }
46  int result = 0;
47  // normalize to out width
48  return result;
49 }
virtual int lookupPacked(int input) const
Definition: MicroGMTLUT.cc:49
int checkedInput(unsigned in, unsigned maxWidth) const
Definition: MicroGMTLUT.cc:70
tuple result
Definition: query.py:137
int hashInput(int angle, int pt) const
void l1t::MicroGMTExtrapolationLUT::unHashInput ( int  input,
int &  angle,
int &  pt 
) const

Definition at line 61 of file MicroGMTExtrapolationLUT.cc.

Member Data Documentation

int l1t::MicroGMTExtrapolationLUT::m_etaRedInWidth
private

Definition at line 26 of file MicroGMTExtrapolationLUT.h.

int l1t::MicroGMTExtrapolationLUT::m_etaRedMask
private

Definition at line 29 of file MicroGMTExtrapolationLUT.h.

int l1t::MicroGMTExtrapolationLUT::m_ptRedInWidth
private

Definition at line 27 of file MicroGMTExtrapolationLUT.h.

int l1t::MicroGMTExtrapolationLUT::m_ptRedMask
private

Definition at line 30 of file MicroGMTExtrapolationLUT.h.