#include <L1MuGMTLUT.h>
Classes | |
class | PortDecoder |
Public Types | |
typedef std::pair< std::string, unsigned > | port |
Public Member Functions | |
L1MuGMTLUT () | |
Init and Destruct. More... | |
L1MuGMTLUT (const char *name, const std::vector< std::string > &instances, const std::vector< port > &in_widths, const std::vector< port > &out_widths, unsigned vme_addr_width=0, bool distrRAM=false) | |
constructor with init More... | |
L1MuGMTLUT (const char *name, const std::string &instances, const std::string &inputs, const std::string &outputs, unsigned vme_addr_width=0, bool distrRAM=false) | |
void | Load (const char *path) |
I/O functions. More... | |
std::vector< unsigned > | Lookup (int idx, const std::vector< unsigned > &address) const |
additional lookup function (std::vector -> vector) More... | |
std::vector< unsigned > | Lookup (int idx, unsigned address) const |
additional lookup function (unsigned -> std::vector) More... | |
virtual unsigned | LookupFunctionPacked (int idx, unsigned address) const |
unsigned | LookupPacked (int idx, unsigned) const |
unsigned | LookupPacked (int idx, const std::vector< unsigned > &address) const |
additional lookup function (std::vector -> unisgned) More... | |
void | MakeSubClass (const char *fname="", const char *template_file_h="../interface/L1MuGMTLUT_SubClass.h_template", const char *template_file_cc="../interface/L1MuGMTLUT_SubClass.cc_template") |
Add Generate SubClass method. More... | |
std::string | Name () |
int | numberOfInstances () |
get the number of Instances More... | |
void | Save (const char *path) |
save to LUT file More... | |
virtual | ~L1MuGMTLUT () |
destructor More... | |
Protected Member Functions | |
void | Init (const char *name, const std::vector< std::string > &instances, const std::vector< port > &in_widths, const std::vector< port > &out_widths, unsigned vme_addr_width=0, bool distrRAM=false) |
Initialize the LUT. More... | |
void | Set (int idx, unsigned address, unsigned value) |
set with single address and value More... | |
std::vector< unsigned > | u2vec (unsigned value, const std::vector< port > &widths) const |
generate composite address or value from compact unsigned More... | |
unsigned | vec2u (const std::vector< unsigned > &vec, const std::vector< port > &widths) const |
generate address or value from composite address or value More... | |
Protected Attributes | |
std::vector< std::vector< unsigned > > | m_Contents |
bool | m_distrRAM |
unsigned | m_GeneralLUTVersion |
bool | m_initialized |
std::vector< port > | m_Inputs |
std::vector< std::string > | m_InstNames |
std::string | m_name |
int | m_NLUTS |
std::vector< port > | m_Outputs |
bool | m_saveFlag |
unsigned | m_TotalInWidth |
unsigned | m_TotalOutWidth |
bool | m_UseLookupFunction |
unsigned | m_vme_addr_width |
Friends | |
class | L1MuGMTLUTConverter |
Description: A general-purpose Look-Up-Table Class
Base class for all LUTs in the Global Muon Trigger Simulation
INPUTS OUTPUTS
| | | |– Y(1) eta(6) –| | 1 8..13 | | phi(8) –| | 0..7 | |– X(1)
std::vector<unsigned> inp; inp [0] = phi inp [1] = eta
std::vector<unsigned> out = MyLUT.Lookup (lutidx, inp); X = out[0]; Y = out[1];
Definition at line 75 of file L1MuGMTLUT.h.
typedef std::pair<std::string, unsigned> L1MuGMTLUT::port |
Definition at line 78 of file L1MuGMTLUT.h.
|
inline |
|
inline |
constructor with init
Definition at line 86 of file L1MuGMTLUT.h.
References Init().
|
inline |
Definition at line 94 of file L1MuGMTLUT.h.
References training_settings::idx, Init(), LookupPacked(), and ~L1MuGMTLUT().
|
virtual |
|
protected |
Initialize the LUT.
Definition at line 47 of file L1MuGMTLUT.cc.
References L1MuGMTConfig::getVersionLUTs(), mps_fire::i, dataset::name, and edm::second().
Referenced by L1MuGMTLUT(), and numberOfInstances().
void L1MuGMTLUT::Load | ( | const char * | path | ) |
I/O functions.
load from LUT file
Definition at line 194 of file L1MuGMTLUT.cc.
References spr::find(), mps_fire::i, recoMuon::in, mps_splice::line, L1MuGMTLUTHelpers::replace(), and relativeConstraints::value.
Referenced by Lookup().
|
inline |
additional lookup function (std::vector -> vector)
Definition at line 115 of file L1MuGMTLUT.h.
References m_Inputs, and vec2u().
Referenced by L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_fine(), L1MuGMTMIAUPhiPro1LUT::SpecificLookup_cphi_ofs(), L1MuGMTLFCOUDeltaEtaLUT::SpecificLookup_delta_eta(), L1MuGMTLFDeltaEtaLUT::SpecificLookup_delta_eta(), L1MuGMTLFDisableHotLUT::SpecificLookup_disable_hot(), L1MuGMTLFPhiProLUT::SpecificLookup_dphi(), L1MuGMTLFEtaConvLUT::SpecificLookup_eta_gmt(), L1MuGMTMIAUEtaConvLUT::SpecificLookup_eta_out(), L1MuGMTLFPhiProEtaConvLUT::SpecificLookup_eta_out(), L1MuGMTLFOvlEtaConvLUT::SpecificLookup_eta_ovl(), L1MuGMTMIAUEtaProLUT::SpecificLookup_eta_sel(), L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_flag(), L1MuGMTLFMergeRankCombineLUT::SpecificLookup_merge_rank(), L1MuGMTLFMatchQualLUT::SpecificLookup_mq(), L1MuGMTMIAUPhiPro2LUT::SpecificLookup_phi_sel(), L1MuGMTLFPtMixLUT::SpecificLookup_pt_mixed(), L1MuGMTLFSortRankEtaPhiLUT::SpecificLookup_rank_etaphi(), L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup_rank_etaphi(), L1MuGMTLFSortRankEtaQLUT::SpecificLookup_rank_etaq(), L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_rank_etaq(), L1MuGMTLFMergeRankPtQLUT::SpecificLookup_rank_ptq(), L1MuGMTLFSortRankPtQLUT::SpecificLookup_rank_ptq(), L1MuGMTLFSortRankCombineLUT::SpecificLookup_sort_rank(), and L1MuGMTLFSortRankEtaQLUT::SpecificLookup_vlq().
|
inline |
additional lookup function (unsigned -> std::vector)
Definition at line 119 of file L1MuGMTLUT.h.
References Load(), LookupPacked(), m_Outputs, callgraph::path, Save(), and u2vec().
|
inlinevirtual |
lookup defined as analytic function to be impemented in derived class
Reimplemented in L1MuGMTMIAUPhiPro1LUT, L1MuGMTLFMergeRankEtaQLUT, L1MuGMTLFSortRankEtaQLUT, L1MuGMTMIAUPhiPro2LUT, L1MuGMTLFMergeRankCombineLUT, L1MuGMTLFPhiProLUT, L1MuGMTLFSortRankCombineLUT, L1MuGMTMIAUEtaProLUT, L1MuGMTLFDisableHotLUT, L1MuGMTLFCOUDeltaEtaLUT, L1MuGMTLFDeltaEtaLUT, L1MuGMTLFMatchQualLUT, L1MuGMTLFMergeRankEtaPhiLUT, L1MuGMTLFMergeRankPtQLUT, L1MuGMTLFPtMixLUT, L1MuGMTLFSortRankEtaPhiLUT, L1MuGMTLFSortRankPtQLUT, L1MuGMTLFEtaConvLUT, L1MuGMTLFOvlEtaConvLUT, L1MuGMTLFPhiProEtaConvLUT, and L1MuGMTMIAUEtaConvLUT.
Definition at line 134 of file L1MuGMTLUT.h.
References alignmentValidation::fname, and MakeSubClass().
Referenced by LookupPacked().
|
inline |
main lookup function (unsigned -> unsigned) all lookup functions go through this one
Definition at line 260 of file L1MuGMTLUT.h.
References training_settings::idx, LookupFunctionPacked(), m_Contents, m_initialized, m_name, m_NLUTS, m_TotalInWidth, m_TotalOutWidth, m_UseLookupFunction, and relativeConstraints::value.
Referenced by L1MuGMTLUT(), Lookup(), LookupPacked(), L1MuGMTLFOvlEtaConvLUT::SpecificLookup(), L1MuGMTLFPhiProEtaConvLUT::SpecificLookup(), L1MuGMTMIAUEtaConvLUT::SpecificLookup(), L1MuGMTLFSortRankPtQLUT::SpecificLookup(), L1MuGMTLFMergeRankPtQLUT::SpecificLookup(), L1MuGMTLFEtaConvLUT::SpecificLookup(), L1MuGMTLFCOUDeltaEtaLUT::SpecificLookup(), L1MuGMTLFMatchQualLUT::SpecificLookup(), L1MuGMTLFDeltaEtaLUT::SpecificLookup(), L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup(), L1MuGMTLFPtMixLUT::SpecificLookup(), L1MuGMTLFSortRankEtaPhiLUT::SpecificLookup(), L1MuGMTLFSortRankCombineLUT::SpecificLookup(), L1MuGMTMIAUEtaProLUT::SpecificLookup(), L1MuGMTLFDisableHotLUT::SpecificLookup(), L1MuGMTLFPhiProLUT::SpecificLookup(), L1MuGMTLFMergeRankCombineLUT::SpecificLookup(), L1MuGMTMIAUPhiPro2LUT::SpecificLookup(), L1MuGMTLFSortRankEtaQLUT::SpecificLookup(), L1MuGMTLFMergeRankEtaQLUT::SpecificLookup(), and L1MuGMTMIAUPhiPro1LUT::SpecificLookup().
|
inline |
additional lookup function (std::vector -> unisgned)
Definition at line 111 of file L1MuGMTLUT.h.
References LookupPacked(), m_Inputs, and vec2u().
void L1MuGMTLUT::MakeSubClass | ( | const char * | fname = "" , |
const char * | template_file_h = "../interface/L1MuGMTLUT_SubClass.h_template" , |
||
const char * | template_file_cc = "../interface/L1MuGMTLUT_SubClass.cc_template" |
||
) |
Add Generate SubClass method.
Definition at line 326 of file L1MuGMTLUT.cc.
References mps_fire::i, recoMuon::in, mps_splice::line, L1MuGMTLUTHelpers::replace(), str, AlCaHLTBitMon_QueryRunRegistry::string, and tmp.
Referenced by LookupFunctionPacked().
|
inline |
|
inline |
get the number of Instances
Definition at line 145 of file L1MuGMTLUT.h.
References Init(), m_NLUTS, dataset::name, Set(), u2vec(), and vec2u().
void L1MuGMTLUT::Save | ( | const char * | path | ) |
save to LUT file
Definition at line 77 of file L1MuGMTLUT.cc.
References mps_fire::i, and L1MuGMTLUT::PortDecoder::str().
Referenced by Lookup().
|
protected |
set with single address and value
Definition at line 171 of file L1MuGMTLUT.cc.
References training_settings::idx, and relativeConstraints::value.
Referenced by numberOfInstances().
|
inlineprotected |
generate composite address or value from compact unsigned
Definition at line 239 of file L1MuGMTLUT.h.
References mps_fire::i, RecoTauDiscriminantConfiguration::mask, and convertSQLitetoXML_cfg::output.
Referenced by Lookup(), L1MuGMTLFOvlEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFPhiProEtaConvLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFSortRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFMatchQualLUT::LookupFunctionPacked(), L1MuGMTLFCOUDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFPtMixLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFDisableHotLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaProLUT::LookupFunctionPacked(), L1MuGMTLFPhiProLUT::LookupFunctionPacked(), L1MuGMTLFSortRankCombineLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankCombineLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaQLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaQLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked(), and numberOfInstances().
|
inlineprotected |
generate address or value from composite address or value
Definition at line 214 of file L1MuGMTLUT.h.
References mps_fire::i.
Referenced by Lookup(), LookupPacked(), and numberOfInstances().
|
friend |
Definition at line 140 of file L1MuGMTLUT.h.
Referenced by Name().
|
protected |
Definition at line 200 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 206 of file L1MuGMTLUT.h.
|
protected |
Definition at line 209 of file L1MuGMTLUT.h.
Referenced by L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction().
|
protected |
Definition at line 196 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 201 of file L1MuGMTLUT.h.
Referenced by Lookup(), L1MuGMTLFOvlEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFPhiProEtaConvLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFSortRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFMatchQualLUT::LookupFunctionPacked(), L1MuGMTLFCOUDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFPtMixLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFDisableHotLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaProLUT::LookupFunctionPacked(), L1MuGMTLFPhiProLUT::LookupFunctionPacked(), L1MuGMTLFSortRankCombineLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankCombineLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaQLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaQLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked(), and LookupPacked().
|
protected |
Definition at line 199 of file L1MuGMTLUT.h.
|
protected |
Definition at line 207 of file L1MuGMTLUT.h.
Referenced by LookupPacked(), and Name().
|
protected |
Definition at line 197 of file L1MuGMTLUT.h.
Referenced by LookupPacked(), and numberOfInstances().
|
protected |
Definition at line 202 of file L1MuGMTLUT.h.
Referenced by Lookup().
|
protected |
Definition at line 208 of file L1MuGMTLUT.h.
Referenced by L1MuGMTLFPhiProEtaConvLUT::TheLookupFunction(), L1MuGMTMIAUEtaConvLUT::TheLookupFunction(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().
|
protected |
Definition at line 203 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 204 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 198 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 205 of file L1MuGMTLUT.h.