CMS 3D CMS Logo

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
def create(alignables, pedeDump, additionalData, outputFile, config)
delete x;
Definition: CaloConfig.h:22
Log< level::Error, false > LogError
std::map< DetId, double > ReturnType
Definition: LUT.h:29
HLT enums.
std::shared_ptr< MicroGMTMatchQualLUT > ReturnType