CMS 3D CMS Logo

MicroGMTExtrapolationLUTFactory.cc
Go to the documentation of this file.
1 //
7 // This class implements the ExtrapolationLUT factory. Based on the firmware
8 // version it selects the appropriate concrete implementation.
9 //
10 
12 
14 
15 using namespace edm;
16 
17 namespace l1t {
20  ReturnType p;
21 
22  int outWidth = 3;
23  if (type == MicroGMTConfiguration::ETA_OUT) {
24  outWidth = 4;
25  }
26 
27  if (fwVersion >= 1 && fwVersion < 0x4010000) {
28  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, outWidth, 6, 6);
29  } else if (fwVersion >= 0x4010000) {
30  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, 4, 5, 7);
31  } else {
32  LogError("MicroGMTExtrapolationLUTFactory") << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
33  }
34  return p;
35  }
36 
39  ReturnType p;
40 
41  int outWidth = 3;
42  if (type == MicroGMTConfiguration::ETA_OUT) {
43  outWidth = 4;
44  }
45 
46  if (fwVersion >= 1 && fwVersion < 0x4010000) {
47  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, outWidth, 6, 6);
48  } else if (fwVersion >= 0x4010000) {
49  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, 4, 5, 7);
50  } else {
51  LogError("MicroGMTExtrapolationLUTFactory") << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
52  }
53  return p;
54  }
55 }
type
Definition: HCALResponse.h:21
std::shared_ptr< MicroGMTExtrapolationLUT > ReturnType
def create(alignables, pedeDump, additionalData, outputFile, config)
delete x;
Definition: CaloConfig.h:22
std::map< DetId, double > ReturnType
Definition: LUT.h:29
HLT enums.