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 {
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
amcDumpToRaw_cfi.fwVersion
fwVersion
Definition: amcDumpToRaw_cfi.py:11
MessageLogger.h
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
beamerCreator.create
def create(alignables, pedeDump, additionalData, outputFile, config)
Definition: beamerCreator.py:44
l1t::MicroGMTExtrapolationLUTFactory::ReturnType
std::shared_ptr< MicroGMTExtrapolationLUT > ReturnType
Definition: MicroGMTLUTFactories.h:49
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
l1t
delete x;
Definition: CaloConfig.h:22
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
MicroGMTLUTFactories.h
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
l1t::LUT
Definition: LUT.h:29
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143