CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 {
19  const int type,
20  const int fwVersion) {
21  ReturnType p;
22 
23  int outWidth = 3;
24  if (type == MicroGMTConfiguration::ETA_OUT) {
25  outWidth = 4;
26  }
27 
28  if (fwVersion >= 1 && fwVersion < 0x4010000) {
29  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, outWidth, 6, 6);
30  } else if (fwVersion >= 0x4010000) {
31  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(filename, 4, 5, 7);
32  } else {
33  LogError("MicroGMTExtrapolationLUTFactory")
34  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
35  }
36  return p;
37  }
38 
40  const int type,
41  const int fwVersion) {
42  ReturnType p;
43 
44  int outWidth = 3;
45  if (type == MicroGMTConfiguration::ETA_OUT) {
46  outWidth = 4;
47  }
48 
49  if (fwVersion >= 1 && fwVersion < 0x4010000) {
50  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, outWidth, 6, 6);
51  } else if (fwVersion >= 0x4010000) {
52  p = std::make_shared<l1t::MicroGMTExtrapolationLUT>(lut, 4, 5, 7);
53  } else {
54  LogError("MicroGMTExtrapolationLUTFactory")
55  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
56  }
57  return p;
58  }
59 } // namespace l1t
std::shared_ptr< MicroGMTExtrapolationLUT > ReturnType
Log< level::Error, false > LogError
Definition: LUT.h:29
tuple filename
Definition: lut2db_cfg.py:20