CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignableObjectId.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignment_AlignableObjectId_h
2 #define Alignment_CommonAlignment_AlignableObjectId_h
3 
4 #include <map>
5 #include <string>
6 
8 
11 {
12 
13 public:
14 
17 
18  typedef std::map<align::StructureType, std::string> MapEnumType;
19  typedef std::map<std::string, align::StructureType> ReverseMapEnumType;
20  typedef std::pair<align::StructureType, std::string> PairEnumType;
21  typedef std::pair<std::string, align::StructureType> PairEnumReverseType;
22 
24  align::StructureType nameToType( const std::string& name ) const;
25 
27  const std::string& typeToName( align::StructureType type ) const;
28 
29 private:
32 
33  // Reverse functor
34  struct reverse_pair {
36  {
37  return PairEnumReverseType( pair.second, pair.first );
38  }
39  };
40 
41 
42 };
43 
44 #endif
type
Definition: HCALResponse.h:22
std::map< align::StructureType, std::string > MapEnumType
std::pair< align::StructureType, std::string > PairEnumType
AlignableObjectId()
Constructor (create maps)
std::map< std::string, align::StructureType > ReverseMapEnumType
const std::string & typeToName(align::StructureType type) const
Convert type to name.
Allows conversion between type and name, and vice-versa.
PairEnumReverseType operator()(const PairEnumType &pair) const
std::pair< std::string, align::StructureType > PairEnumReverseType
align::StructureType nameToType(const std::string &name) const
Convert name to type.
ReverseMapEnumType theReverseMap