CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/Alignment/CommonAlignment/interface/AlignableObjectId.h

Go to the documentation of this file.
00001 #ifndef Alignment_CommonAlignment_AlignableObjectId_h
00002 #define Alignment_CommonAlignment_AlignableObjectId_h
00003 
00004 #include <map>
00005 #include <string>
00006 
00007 #include "Alignment/CommonAlignment/interface/StructureType.h"
00008 
00010 class AlignableObjectId 
00011 {
00012 
00013 public:
00014   
00016   AlignableObjectId();
00017 
00018   typedef std::map<align::StructureType, std::string> MapEnumType;
00019   typedef std::map<std::string, align::StructureType> ReverseMapEnumType;
00020   typedef std::pair<align::StructureType, std::string> PairEnumType;
00021   typedef std::pair<std::string, align::StructureType> PairEnumReverseType;
00022 
00024   const align::StructureType nameToType( const std::string& name ) const;
00025 
00027   const std::string& typeToName( align::StructureType type ) const;
00028 
00029 private:
00030   MapEnumType theMap;
00031   ReverseMapEnumType theReverseMap;
00032 
00033   // Reverse functor
00034   struct reverse_pair {
00035         PairEnumReverseType operator()( const PairEnumType& pair ) const 
00036         { 
00037           return PairEnumReverseType( pair.second, pair.first ); 
00038         }
00039   };
00040 
00041 
00042 };
00043 
00044 #endif