CMS 3D CMS Logo

MuonGeometryConstants.h
Go to the documentation of this file.
1 #ifndef Geometry_MuonNumbering_MuonGeometryConstants_h
2 #define Geometry_MuonNumbering_MuonGeometryConstants_h
3 
15 #include <string>
16 #include <map>
17 #include <iostream>
19 
21 public:
23 
24  int getValue(const std::string& name) const;
25  void addValue(const std::string& name, const int& value);
26  unsigned size() const { return namesAndValues_.size(); }
27  std::pair<std::string, int> getEntry(const unsigned int k) const {
28  auto itr = namesAndValues_.begin();
29  for (unsigned int i = 0; i < k; ++i)
30  ++itr;
31  if (k < size())
32  return std::pair<std::string, int>(itr->first, itr->second);
33  else
34  return std::pair<std::string, int>("Not Found", 0);
35  }
36 
37 private:
38  std::map<std::string, int> namesAndValues_;
40 };
41 
42 #endif
int getValue(const std::string &name) const
void addValue(const std::string &name, const int &value)
Definition: value.py:1
#define COND_SERIALIZABLE
Definition: Serializable.h:39
std::pair< std::string, int > getEntry(const unsigned int k) const
std::map< std::string, int > namesAndValues_