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
MuonGeometryConstants::namesAndValues_
std::map< std::string, int > namesAndValues_
Definition: MuonGeometryConstants.h:38
MuonGeometryConstants
Definition: MuonGeometryConstants.h:20
mps_fire.i
i
Definition: mps_fire.py:428
MuonGeometryConstants::MuonGeometryConstants
MuonGeometryConstants()
Definition: MuonGeometryConstants.h:22
COND_SERIALIZABLE
#define COND_SERIALIZABLE
Definition: Serializable.h:39
MuonGeometryConstants::addValue
void addValue(const std::string &name, const int &value)
Definition: MuonGeometryConstants.cc:25
dqmdumpme.k
k
Definition: dqmdumpme.py:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Serializable.h
value
Definition: value.py:1
MuonGeometryConstants::getEntry
std::pair< std::string, int > getEntry(const unsigned int k) const
Definition: MuonGeometryConstants.h:27
MuonGeometryConstants::getValue
int getValue(const std::string &name) const
Definition: MuonGeometryConstants.cc:8
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:29
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
MuonGeometryConstants::size
unsigned size() const
Definition: MuonGeometryConstants.h:26