File indexing completed on 2024-04-06 12:20:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0012
0013 #include "L1Trigger/L1TMuon/interface/MicroGMTLUTFactories.h"
0014
0015 using namespace edm;
0016
0017 namespace l1t {
0018 MicroGMTExtrapolationLUTFactory::ReturnType MicroGMTExtrapolationLUTFactory::create(const std::string& filename,
0019 const int type,
0020 const int fwVersion) {
0021 ReturnType p;
0022
0023 int outWidth = 3;
0024 if (type == MicroGMTConfiguration::ETA_OUT) {
0025 outWidth = 4;
0026 }
0027
0028 if (fwVersion >= 1 && fwVersion < 0x4010000) {
0029 p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, outWidth, 6, 6);
0030 } else if (fwVersion >= 0x4010000) {
0031 p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, 4, 5, 7);
0032 } else {
0033 LogError("MicroGMTExtrapolationLUTFactory")
0034 << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
0035 }
0036 return p;
0037 }
0038
0039 MicroGMTExtrapolationLUTFactory::ReturnType MicroGMTExtrapolationLUTFactory::create(l1t::LUT* lut,
0040 const int type,
0041 const int fwVersion) {
0042 ReturnType p;
0043
0044 int outWidth = 3;
0045 if (type == MicroGMTConfiguration::ETA_OUT) {
0046 outWidth = 4;
0047 }
0048
0049 if (fwVersion >= 1 && fwVersion < 0x4010000) {
0050 p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, outWidth, 6, 6);
0051 } else if (fwVersion >= 0x4010000) {
0052 p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, 4, 5, 7);
0053 } else {
0054 LogError("MicroGMTExtrapolationLUTFactory")
0055 << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
0056 }
0057 return p;
0058 }
0059 }