#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::string &instances, const std::string &inputs, const std::string &outputs, unsigned vme_addr_width=0, bool distrRAM=false) | |
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... | |
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, const std::vector< unsigned > &address) const |
additional lookup function (std::vector -> unisgned) More... | |
unsigned | LookupPacked (int idx, unsigned) const |
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 73 of file L1MuGMTLUT.h.
typedef std::pair<std::string, unsigned> L1MuGMTLUT::port |
Definition at line 75 of file L1MuGMTLUT.h.
|
inline |
|
inline |
constructor with init
Definition at line 83 of file L1MuGMTLUT.h.
References Init(), and Skims_PA_cff::name.
|
inline |
Definition at line 93 of file L1MuGMTLUT.h.
References Init(), PixelMapPlotter::inputs, Skims_PA_cff::name, and PatBasicFWLiteJetAnalyzer_Selector_cfg::outputs.
|
virtual |
|
protected |
Initialize the LUT.
Definition at line 46 of file L1MuGMTLUT.cc.
References L1MuGMTConfig::getVersionLUTs(), mps_fire::i, Skims_PA_cff::name, and edm::second().
Referenced by L1MuGMTLUT().
void L1MuGMTLUT::Load | ( | const char * | path | ) |
I/O functions.
load from LUT file
Definition at line 200 of file L1MuGMTLUT.cc.
References visDQMUpload::buf, spr::find(), mps_fire::i, recoMuon::in, mps_splice::line, castor_dqm_sourceclient_file_cfg::path, L1MuGMTLUTHelpers::replace(), and relativeConstraints::value.
|
inline |
additional lookup function (std::vector -> vector)
Definition at line 121 of file L1MuGMTLUT.h.
References charmTagsComputerCvsB_cfi::idx, 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(), L1MuGMTLFPhiProEtaConvLUT::SpecificLookup_eta_out(), L1MuGMTMIAUEtaConvLUT::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(), L1MuGMTLFMergeRankEtaQLUT::SpecificLookup_rank_etaq(), L1MuGMTLFSortRankEtaQLUT::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 126 of file L1MuGMTLUT.h.
References charmTagsComputerCvsB_cfi::idx, LookupPacked(), m_Outputs, and u2vec().
|
inlinevirtual |
lookup defined as analytic function to be impemented in derived class
Reimplemented in L1MuGMTMIAUPhiPro1LUT, L1MuGMTMIAUPhiPro2LUT, L1MuGMTLFMergeRankEtaQLUT, L1MuGMTLFSortRankEtaQLUT, L1MuGMTLFMergeRankCombineLUT, L1MuGMTLFSortRankCombineLUT, L1MuGMTMIAUEtaProLUT, L1MuGMTMIAUEtaConvLUT, L1MuGMTLFMatchQualLUT, L1MuGMTLFPhiProLUT, L1MuGMTLFCOUDeltaEtaLUT, L1MuGMTLFDeltaEtaLUT, L1MuGMTLFMergeRankEtaPhiLUT, L1MuGMTLFSortRankEtaPhiLUT, L1MuGMTLFDisableHotLUT, L1MuGMTLFMergeRankPtQLUT, L1MuGMTLFPtMixLUT, L1MuGMTLFSortRankPtQLUT, L1MuGMTLFOvlEtaConvLUT, L1MuGMTLFEtaConvLUT, and L1MuGMTLFPhiProEtaConvLUT.
Definition at line 140 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
inline |
additional lookup function (std::vector -> unisgned)
Definition at line 116 of file L1MuGMTLUT.h.
References charmTagsComputerCvsB_cfi::idx, LookupPacked(), m_Inputs, and vec2u().
|
inline |
main lookup function (unsigned -> unsigned) all lookup functions go through this one
Definition at line 272 of file L1MuGMTLUT.h.
References charmTagsComputerCvsB_cfi::idx, LookupFunctionPacked(), m_Contents, m_initialized, m_name, m_NLUTS, m_TotalInWidth, m_TotalOutWidth, m_UseLookupFunction, and relativeConstraints::value.
Referenced by Lookup(), LookupPacked(), L1MuGMTLFEtaConvLUT::SpecificLookup(), L1MuGMTLFPhiProEtaConvLUT::SpecificLookup(), L1MuGMTLFSortRankPtQLUT::SpecificLookup(), L1MuGMTLFMergeRankPtQLUT::SpecificLookup(), L1MuGMTLFDisableHotLUT::SpecificLookup(), L1MuGMTLFOvlEtaConvLUT::SpecificLookup(), L1MuGMTLFPtMixLUT::SpecificLookup(), L1MuGMTLFSortRankEtaPhiLUT::SpecificLookup(), L1MuGMTLFDeltaEtaLUT::SpecificLookup(), L1MuGMTLFCOUDeltaEtaLUT::SpecificLookup(), L1MuGMTLFPhiProLUT::SpecificLookup(), L1MuGMTLFMergeRankEtaPhiLUT::SpecificLookup(), L1MuGMTLFMatchQualLUT::SpecificLookup(), L1MuGMTMIAUEtaConvLUT::SpecificLookup(), L1MuGMTMIAUEtaProLUT::SpecificLookup(), L1MuGMTLFSortRankCombineLUT::SpecificLookup(), L1MuGMTLFMergeRankCombineLUT::SpecificLookup(), L1MuGMTLFSortRankEtaQLUT::SpecificLookup(), L1MuGMTLFMergeRankEtaQLUT::SpecificLookup(), L1MuGMTMIAUPhiPro2LUT::SpecificLookup(), and L1MuGMTMIAUPhiPro1LUT::SpecificLookup().
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 333 of file L1MuGMTLUT.cc.
References visDQMUpload::buf, alignmentValidation::fname, mps_fire::i, recoMuon::in, dqmiolumiharvest::j, mps_splice::line, L1MuGMTLUTHelpers::replace(), str, AlCaHLTBitMon_QueryRunRegistry::string, and createJobs::tmp.
|
inline |
|
inline |
void L1MuGMTLUT::Save | ( | const char * | path | ) |
save to LUT file
Definition at line 78 of file L1MuGMTLUT.cc.
References generateTowerEtThresholdLUT::addr, mps_fire::i, castor_dqm_sourceclient_file_cfg::path, and L1MuGMTLUT::PortDecoder::str().
|
protected |
set with single address and value
Definition at line 177 of file L1MuGMTLUT.cc.
References charmTagsComputerCvsB_cfi::idx, and relativeConstraints::value.
|
inlineprotected |
generate composite address or value from compact unsigned
Definition at line 251 of file L1MuGMTLUT.h.
References mps_fire::i, and convertSQLitetoXML_cfg::output.
Referenced by Lookup(), L1MuGMTLFEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFPhiProEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFOvlEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFSortRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFDisableHotLUT::LookupFunctionPacked(), L1MuGMTLFPtMixLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFCOUDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFMatchQualLUT::LookupFunctionPacked(), L1MuGMTLFPhiProLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFSortRankCombineLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaProLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankCombineLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaQLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaQLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked(), and L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked().
|
inlineprotected |
generate address or value from composite address or value
Definition at line 227 of file L1MuGMTLUT.h.
References mps_fire::i.
Referenced by Lookup(), and LookupPacked().
|
friend |
Definition at line 147 of file L1MuGMTLUT.h.
|
protected |
Definition at line 213 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 219 of file L1MuGMTLUT.h.
|
protected |
Definition at line 222 of file L1MuGMTLUT.h.
Referenced by L1MuGMTLFMergeRankEtaQLUT::TheLookupFunction().
|
protected |
Definition at line 209 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 214 of file L1MuGMTLUT.h.
Referenced by Lookup(), L1MuGMTLFEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFPhiProEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFOvlEtaConvLUT::LookupFunctionPacked(), L1MuGMTLFSortRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankPtQLUT::LookupFunctionPacked(), L1MuGMTLFDisableHotLUT::LookupFunctionPacked(), L1MuGMTLFPtMixLUT::LookupFunctionPacked(), L1MuGMTLFDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFCOUDeltaEtaLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaPhiLUT::LookupFunctionPacked(), L1MuGMTLFMatchQualLUT::LookupFunctionPacked(), L1MuGMTLFPhiProLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaConvLUT::LookupFunctionPacked(), L1MuGMTMIAUEtaProLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankCombineLUT::LookupFunctionPacked(), L1MuGMTLFSortRankCombineLUT::LookupFunctionPacked(), L1MuGMTLFMergeRankEtaQLUT::LookupFunctionPacked(), L1MuGMTLFSortRankEtaQLUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro2LUT::LookupFunctionPacked(), L1MuGMTMIAUPhiPro1LUT::LookupFunctionPacked(), and LookupPacked().
|
protected |
Definition at line 212 of file L1MuGMTLUT.h.
|
protected |
Definition at line 220 of file L1MuGMTLUT.h.
Referenced by LookupPacked(), and Name().
|
protected |
Definition at line 210 of file L1MuGMTLUT.h.
Referenced by LookupPacked(), and numberOfInstances().
|
protected |
Definition at line 215 of file L1MuGMTLUT.h.
Referenced by Lookup().
|
protected |
Definition at line 221 of file L1MuGMTLUT.h.
Referenced by L1MuGMTLFPhiProEtaConvLUT::TheLookupFunction(), L1MuGMTMIAUEtaConvLUT::TheLookupFunction(), and L1MuGMTMIAUEtaProLUT::TheLookupFunction().
|
protected |
Definition at line 216 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 217 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 211 of file L1MuGMTLUT.h.
Referenced by LookupPacked().
|
protected |
Definition at line 218 of file L1MuGMTLUT.h.