Back to home page

Project CMSSW displayed by LXR

 
 

    


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 // Static
0008 const int HostLut::kInvalid = -1;
0009 
0010 // Member
0011 HostLut::HostLut() {
0012   lut_[{1, 1, 4}] = 0;   // ME1/1a
0013   lut_[{1, 1, 1}] = 0;   // ME1/1b
0014   lut_[{1, 1, 2}] = 1;   // ME1/2
0015   lut_[{1, 1, 3}] = 2;   // ME1/3
0016   lut_[{1, 2, 1}] = 3;   // ME2/1
0017   lut_[{1, 2, 2}] = 4;   // ME2/2
0018   lut_[{1, 3, 1}] = 5;   // ME3/1
0019   lut_[{1, 3, 2}] = 6;   // ME3/2
0020   lut_[{1, 4, 1}] = 7;   // ME4/1
0021   lut_[{1, 4, 2}] = 8;   // ME4/2
0022   lut_[{3, 1, 1}] = 9;   // GE1/1
0023   lut_[{2, 1, 2}] = 10;  // RE1/2
0024   lut_[{2, 1, 3}] = 11;  // RE1/3
0025   lut_[{3, 2, 1}] = 12;  // GE2/1
0026   lut_[{2, 2, 2}] = 13;  // RE2/2
0027   lut_[{2, 2, 3}] = 13;  // RE2/3
0028   lut_[{2, 3, 1}] = 14;  // RE3/1
0029   lut_[{2, 3, 2}] = 15;  // RE3/2
0030   lut_[{2, 3, 3}] = 15;  // RE3/3
0031   lut_[{2, 4, 1}] = 16;  // RE4/1
0032   lut_[{2, 4, 2}] = 17;  // RE4/2
0033   lut_[{2, 4, 3}] = 17;  // RE4/3
0034   lut_[{4, 1, 4}] = 18;  // ME0
0035 }
0036 
0037 HostLut::~HostLut() {
0038   // Do Nothing
0039 }
0040 
0041 void HostLut::update(const edm::Event&, const edm::EventSetup&) {
0042   // Do Nothing
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 }