CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDTypes.cc
Go to the documentation of this file.
1 
2 
4 #include <iostream>
6 
7 std::ostream & operator<<(std::ostream & os, const DDNumericArguments & t)
8 {
9  DDNumericArguments::const_iterator it(t.begin()), ed(t.end());
10  for(; it != ed; ++it) {
11  os << it->first << '=' << it->second << std::endl;
12  }
13  return os;
14 }
15 
16 std::ostream & operator<<(std::ostream & os, const DDStringArguments & t)
17 {
18  DDStringArguments::const_iterator it(t.begin()), ed(t.end());
19  for(; it != ed; ++it) {
20  os << it->first << '=' << it->second << std::endl;
21  }
22  return os;
23 }
24 
25 std::ostream & operator<<(std::ostream & os, const DDVectorArguments & t)
26 {
27  DDVectorArguments::const_iterator it(t.begin()), ed(t.end());
28  for(; it != ed; ++it) {
29  os << it->first << ": ";
30  std::vector<double>::const_iterator vit(it->second.begin()), ved(it->second.end());
31  for(;vit!=ved;++vit) {
32  os << *vit << ' ';
33  }
34  os << std::endl;
35  }
36  return os;
37 }
38 
39 std::ostream & operator<<(std::ostream & os, const DDMapArguments & t)
40 {
41  DDMapArguments::const_iterator it(t.begin()), ed(t.end());
42  for(; it != ed; ++it) {
43  os << it->first << ": ";
44  std::map<std::string,double>::const_iterator mit(it->second.begin()), med(it->second.end());
45  for(;mit!=med;++mit) {
46  os << mit->first << '=' << mit->second << ' ';
47  }
48  os << std::endl;
49  }
50  return os;
51 }
52 
53 std::ostream & operator<<(std::ostream & os, const DDStringVectorArguments & t)
54 {
55  DDStringVectorArguments::const_iterator it(t.begin()), ed(t.end());
56  for(; it != ed; ++it) {
57  os << it->first << ": ";
58  std::vector<std::string>::const_iterator vit(it->second.begin()), ved(it->second.end());
59  for(; vit!=ved; ++vit) {
60  os << *vit << ' ';
61  }
62  os << std::endl;
63  }
64  return os;
65 }
66 
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
a std::map&lt;std::string,YourType&gt; that offers a const operator[key]; if key is not stored in the std::...
Definition: DDReadMapType.h:13