CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MicroGMTCaloIndexSelectionLUTFactory.cc
Go to the documentation of this file.
1 //
7 // This class implements the CaloIndexSelectionLUT 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 std::string& filename, const int type, const int fwVersion) {
20  ReturnType p;
21 
22  if (fwVersion >= 1) {
23  p = std::make_shared<l1t::MicroGMTCaloIndexSelectionLUT>(filename, type);
24  } else {
25  LogError("MicroGMTCaloIndexSelectionLUTFactory")
26  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
27  }
28  return p;
29  }
30 
32  const int type,
33  const int fwVersion) {
34  ReturnType p;
35 
36  if (fwVersion >= 1) {
37  p = std::make_shared<l1t::MicroGMTCaloIndexSelectionLUT>(lut, type);
38  } else {
39  LogError("MicroGMTCaloIndexSelectionLUTFactory")
40  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
41  }
42  return p;
43  }
44 } // namespace l1t
std::shared_ptr< MicroGMTCaloIndexSelectionLUT > ReturnType
Log< level::Error, false > LogError
Definition: LUT.h:29
tuple filename
Definition: lut2db_cfg.py:20