CMS 3D CMS Logo

SiteLut.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 SiteLut::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}] = 1; // ME1/3
16  lut_[{1, 2, 1}] = 2; // ME2/1
17  lut_[{1, 2, 2}] = 2; // ME2/2
18  lut_[{1, 3, 1}] = 3; // ME3/1
19  lut_[{1, 3, 2}] = 3; // ME3/2
20  lut_[{1, 4, 1}] = 4; // ME4/1
21  lut_[{1, 4, 2}] = 4; // ME4/2
22  lut_[{2, 1, 2}] = 5; // RE1/2
23  lut_[{2, 1, 3}] = 5; // RE1/3
24  lut_[{2, 2, 2}] = 6; // RE2/2
25  lut_[{2, 2, 3}] = 6; // RE2/3
26  lut_[{2, 3, 1}] = 7; // RE3/1
27  lut_[{2, 3, 2}] = 7; // RE3/2
28  lut_[{2, 3, 3}] = 7; // RE3/3
29  lut_[{2, 4, 1}] = 8; // RE4/1
30  lut_[{2, 4, 2}] = 8; // RE4/2
31  lut_[{2, 4, 3}] = 8; // RE4/3
32  lut_[{3, 1, 1}] = 9; // GE1/1
33  lut_[{3, 2, 1}] = 10; // GE2/1
34  lut_[{4, 1, 4}] = 11; // ME0
35 }
36 
38  // Do Nothing
39 }
40 
42  // Do Nothing
43 }
44 
45 const int& SiteLut::lookup(const std::tuple<int, int, int>& key) const {
46  auto found = lut_.find(key);
47 
48  if (found == lut_.end())
49  return SiteLut::kInvalid;
50 
51  return found->second;
52 }
static const int kInvalid
Definition: SiteLut.h:16
void update(const edm::Event &, const edm::EventSetup &)
Definition: SiteLut.cc:41
const int & lookup(const std::tuple< int, int, int > &) const
Definition: SiteLut.cc:45
key
prepare the HTCondor submission files and eventually submit them
std::map< std::tuple< int, int, int >, int > lut_
Definition: SiteLut.h:31