File indexing completed on 2024-04-06 12:21:02
0001 #include <utility>
0002
0003 #include "L1Trigger/L1TMuonEndCapPhase2/interface/Data/HostLut.h"
0004
0005 using namespace emtf::phase2::data;
0006
0007
0008 const int HostLut::kInvalid = -1;
0009
0010
0011 HostLut::HostLut() {
0012 lut_[{1, 1, 4}] = 0;
0013 lut_[{1, 1, 1}] = 0;
0014 lut_[{1, 1, 2}] = 1;
0015 lut_[{1, 1, 3}] = 2;
0016 lut_[{1, 2, 1}] = 3;
0017 lut_[{1, 2, 2}] = 4;
0018 lut_[{1, 3, 1}] = 5;
0019 lut_[{1, 3, 2}] = 6;
0020 lut_[{1, 4, 1}] = 7;
0021 lut_[{1, 4, 2}] = 8;
0022 lut_[{3, 1, 1}] = 9;
0023 lut_[{2, 1, 2}] = 10;
0024 lut_[{2, 1, 3}] = 11;
0025 lut_[{3, 2, 1}] = 12;
0026 lut_[{2, 2, 2}] = 13;
0027 lut_[{2, 2, 3}] = 13;
0028 lut_[{2, 3, 1}] = 14;
0029 lut_[{2, 3, 2}] = 15;
0030 lut_[{2, 3, 3}] = 15;
0031 lut_[{2, 4, 1}] = 16;
0032 lut_[{2, 4, 2}] = 17;
0033 lut_[{2, 4, 3}] = 17;
0034 lut_[{4, 1, 4}] = 18;
0035 }
0036
0037 HostLut::~HostLut() {
0038
0039 }
0040
0041 void HostLut::update(const edm::Event&, const edm::EventSetup&) {
0042
0043 }
0044
0045 const int& HostLut::lookup(const std::tuple<int, int, int>& key) const {
0046 auto found = lut_.find(key);
0047
0048 if (found == lut_.end())
0049 return HostLut::kInvalid;
0050
0051 return found->second;
0052 }