CMS 3D CMS Logo

HostLut.cc
Go to the documentation of this file.
1 #include <utility>
2 
4 
5 using namespace emtf::phase2::data;
6 
7 // Static
8 const int HostLut::kInvalid = -1;
9 
10 // Member
12  lut_[{1, 1, 4}] = 0; // ME1/1a
13  lut_[{1, 1, 1}] = 0; // ME1/1b
14  lut_[{1, 1, 2}] = 1; // ME1/2
15  lut_[{1, 1, 3}] = 2; // ME1/3
16  lut_[{1, 2, 1}] = 3; // ME2/1
17  lut_[{1, 2, 2}] = 4; // ME2/2
18  lut_[{1, 3, 1}] = 5; // ME3/1
19  lut_[{1, 3, 2}] = 6; // ME3/2
20  lut_[{1, 4, 1}] = 7; // ME4/1
21  lut_[{1, 4, 2}] = 8; // ME4/2
22  lut_[{3, 1, 1}] = 9; // GE1/1
23  lut_[{2, 1, 2}] = 10; // RE1/2
24  lut_[{2, 1, 3}] = 11; // RE1/3
25  lut_[{3, 2, 1}] = 12; // GE2/1
26  lut_[{2, 2, 2}] = 13; // RE2/2
27  lut_[{2, 2, 3}] = 13; // RE2/3
28  lut_[{2, 3, 1}] = 14; // RE3/1
29  lut_[{2, 3, 2}] = 15; // RE3/2
30  lut_[{2, 3, 3}] = 15; // RE3/3
31  lut_[{2, 4, 1}] = 16; // RE4/1
32  lut_[{2, 4, 2}] = 17; // RE4/2
33  lut_[{2, 4, 3}] = 17; // RE4/3
34  lut_[{4, 1, 4}] = 18; // ME0
35 }
36 
38  // Do Nothing
39 }
40 
42  // Do Nothing
43 }
44 
45 const int& HostLut::lookup(const std::tuple<int, int, int>& key) const {
46  auto found = lut_.find(key);
47 
48  if (found == lut_.end())
49  return HostLut::kInvalid;
50 
51  return found->second;
52 }
std::map< std::tuple< int, int, int >, int > lut_
Definition: HostLut.h:30
static const int kInvalid
Definition: HostLut.h:15
void update(const edm::Event &, const edm::EventSetup &)
Definition: HostLut.cc:41
key
prepare the HTCondor submission files and eventually submit them
const int & lookup(const std::tuple< int, int, int > &) const
Definition: HostLut.cc:45