Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:54

0001 #ifndef Geometry_MTDNumberingBuilder_CmsMTDStringToEnum_H
0002 #define Geometry_MTDNumberingBuilder_CmsMTDStringToEnum_H
0003 
0004 #include "Geometry/MTDNumberingBuilder/interface/GeometricTimingDet.h"
0005 #include <string>
0006 #include <map>
0007 /**
0008  * Builds map between Det type and an enum
0009  */
0010 class CmsMTDStringToEnum {
0011 public:
0012   static constexpr size_t kModStrLen = 7;
0013 
0014   using MapEnumType = std::map<std::string, GeometricTimingDet::GeometricTimingEnumType>;
0015 
0016   GeometricTimingDet::GeometricTimingEnumType type(std::string const&) const;
0017 
0018 private:
0019   static MapEnumType const& map() { return m_impl.map_; }
0020 
0021   // a quick fix
0022   struct Impl {
0023     Impl();
0024     MapEnumType map_;
0025   };
0026 
0027   static const Impl m_impl;
0028 };
0029 #endif