CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC4_patch1/src/DetectorDescription/Core/interface/DDValuePair.h

Go to the documentation of this file.
00001 #ifndef DDValuePair_h
00002 #define DDValuePair_h
00003 
00004 #include <string>
00005 #include <map>
00006 //#include <utility>
00007 
00008 struct DDValuePair : public std::pair<std::string,double>
00009 {
00010   DDValuePair() { }
00011   DDValuePair(const std::string & s, double d) : std::pair<std::string,double>(s,d) { }
00012   DDValuePair(const std::string & s) : std::pair<std::string,double>(s,0) { }
00013   DDValuePair(double d) : std::pair<std::string,double>("",d) { }
00014   
00015   operator const std::string&() const { return first; }
00016   operator std::string&() { return first; }
00017   operator const double&() const { return second; }
00018   operator double&() { return second; }
00019   
00020 };
00021 
00022 std::ostream & operator<<(std::ostream & o, const DDValuePair & v);
00023 
00024 
00025 #endif