Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-12 03:09:14

0001 #ifndef DDValuePair_h
0002 #define DDValuePair_h
0003 
0004 #include <string>
0005 #include <map>
0006 //#include <utility>
0007 
0008 struct DDValuePair : public std::pair<std::string, double> {
0009   DDValuePair() {}
0010   DDValuePair(const std::string& s, double d) : std::pair<std::string, double>(s, d) {}
0011   DDValuePair(const std::string& s) : std::pair<std::string, double>(s, 0) {}
0012   DDValuePair(double d) : std::pair<std::string, double>("", d) {}
0013 
0014   operator const std::string&() const { return first; }
0015   operator std::string&() { return first; }
0016   operator const double&() const { return second; }
0017   operator double&() { return second; }
0018 };
0019 
0020 std::ostream& operator<<(std::ostream& o, const DDValuePair& v);
0021 
0022 #endif