CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DDValuePair.h
Go to the documentation of this file.
1 #ifndef DDValuePair_h
2 #define DDValuePair_h
3 
4 #include <string>
5 #include <map>
6 //#include <utility>
7 
8 struct DDValuePair : public std::pair<std::string, double> {
10  DDValuePair(const std::string& s, double d) : std::pair<std::string, double>(s, d) {}
11  DDValuePair(const std::string& s) : std::pair<std::string, double>(s, 0) {}
12  DDValuePair(double d) : std::pair<std::string, double>("", d) {}
13 
14  operator const std::string&() const { return first; }
15  operator std::string&() { return first; }
16  operator const double&() const { return second; }
17  operator double&() { return second; }
18 };
19 
20 std::ostream& operator<<(std::ostream& o, const DDValuePair& v);
21 
22 #endif
DDValuePair(const std::string &s)
Definition: DDValuePair.h:11
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:167
DDValuePair(const std::string &s, double d)
Definition: DDValuePair.h:10
U second(std::pair< T, U > const &p)
DDValuePair(double d)
Definition: DDValuePair.h:12
tuple d
Definition: ztail.py:151