CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
DDTypes.h File Reference
#include <string>
#include <vector>
#include <map>
#include "DetectorDescription/Base/interface/DDReadMapType.h"
#include <iosfwd>

Go to the source code of this file.

Typedefs

typedef ReadMapType< std::map
< std::string, double > > 
DDMapArguments
 corresponds to a collection of named std::maps of strings to double */ More...
 
typedef ReadMapType< double > DDNumericArguments
 corresponds to a collection of named doubles More...
 
typedef ReadMapType< std::string > DDStringArguments
 corresponds to a collection of named strings More...
 
typedef ReadMapType
< std::vector< std::string > > 
DDStringVectorArguments
 
typedef ReadMapType
< std::vector< double > > 
DDVectorArguments
 corresponds to a collection of named std::vectors of doubles */ More...
 

Functions

std::ostream & operator<< (std::ostream &os, const DDNumericArguments &t)
 
std::ostream & operator<< (std::ostream &os, const DDStringArguments &t)
 
std::ostream & operator<< (std::ostream &os, const DDVectorArguments &t)
 

Typedef Documentation

typedef ReadMapType<std::map<std::string,double> > DDMapArguments

corresponds to a collection of named std::maps of strings to double */

in XML: a set of <Map name="n"> val:1, val_2:2 </Map>

Definition at line 24 of file DDTypes.h.

corresponds to a collection of named doubles

in XML: a set of <Numeric name="n" value="1">

Definition at line 12 of file DDTypes.h.

typedef ReadMapType<std::string> DDStringArguments

corresponds to a collection of named strings

in XML: a set of <String name="n" value="val">

Definition at line 16 of file DDTypes.h.

typedef ReadMapType<std::vector<std::string> > DDStringVectorArguments

Definition at line 26 of file DDTypes.h.

typedef ReadMapType<std::vector<double> > DDVectorArguments

corresponds to a collection of named std::vectors of doubles */

in XML: a set of <Vector name="n"> 1,2,3,4 </Vector>

Definition at line 20 of file DDTypes.h.

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DDNumericArguments t 
)

Definition at line 7 of file DDTypes.cc.

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 }
std::ostream & operator<< ( std::ostream &  os,
const DDStringArguments t 
)

Definition at line 39 of file DDTypes.cc.

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 }
std::ostream& operator<< ( std::ostream &  os,
const DDVectorArguments t 
)

Definition at line 25 of file DDTypes.cc.

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 }