CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MicroGMTMatchQualLUTFactory.cc
Go to the documentation of this file.
1 //
7 // This class implements the MatchQualLUT 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 double maxDR,
20  const double fEta,
21  const double fEtaCoarse,
22  const double fPhi,
23  cancel_t cancelType,
24  const int fwVersion) {
25  ReturnType p;
26 
27  if (fwVersion == 1) {
28  p = ReturnType(new MicroGMTMatchQualSimpleLUT(filename, maxDR, fEtaCoarse, fPhi, cancelType));
29  } else if (fwVersion >= 0x2020000) {
30  p = ReturnType(new MicroGMTMatchQualFineLUT(filename, maxDR, fEta, fEtaCoarse, fPhi, cancelType));
31  } else {
32  LogError("MicroGMTMatchQualLUTFactory")
33  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
34  }
35  return p;
36  }
37 
39  cancel_t cancelType,
40  const int fwVersion) {
41  ReturnType p;
42 
43  if (fwVersion == 1) {
44  p = ReturnType(new MicroGMTMatchQualSimpleLUT(lut, cancelType));
45  } else if (fwVersion >= 0x2020000) {
46  p = ReturnType(new MicroGMTMatchQualFineLUT(lut, cancelType));
47  } else {
48  LogError("MicroGMTMatchQualLUTFactory")
49  << "Invalid firmware version requested: 0x" << std::hex << fwVersion << std::dec;
50  }
51  return p;
52  }
53 } // namespace l1t
Log< level::Error, false > LogError
std::map< DetId, double > ReturnType
Definition: LUT.h:29
tuple filename
Definition: lut2db_cfg.py:20
std::shared_ptr< MicroGMTMatchQualLUT > ReturnType