CMS 3D CMS Logo

DDMap.h File Reference

#include "DetectorDescription/Core/interface/DDBase.h"
#include "DetectorDescription/Core/interface/DDName.h"
#include "DetectorDescription/Base/interface/DDReadMapType.h"
#include <string>
#include <iostream>

Go to the source code of this file.

Classes

class  DDMap
 a named constant corresponding to the DDL-XML tag <Constant> and <ConstantsVector> More...

Typedefs

typedef ReadMapType< double > dd_map_type
 simply a std::map<std::string,double> supporting an addional operator[] const

Functions

std::ostream & operator<< (std::ostream &o, const DDMap &cons)
 output operator for printing ...


Typedef Documentation

typedef ReadMapType<double> dd_map_type

simply a std::map<std::string,double> supporting an addional operator[] const

Definition at line 16 of file DDMap.h.


Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const DDMap cons 
)

output operator for printing ...

Definition at line 23 of file DDMap.cc.

References DDBase< N, C >::isDefined(), it, DDBase< N, C >::name(), DDMap::size(), and DDMap::values().

00024 {
00025   os << "DDMap name=" << cons.name(); 
00026   
00027   if(cons.isDefined().second) {
00028     os << " size=" << cons.size() << " vals=( ";
00029     DDMap::value_type::const_iterator it(cons.values().begin()), ed(cons.values().end());
00030     for(; it != ed; ++it) {
00031       os << it->first << '=' << it->second << ' ';
00032     }
00033     os << ')';
00034   }
00035   else {
00036     os << " DDMap is not yet defined, only declared.";
00037   }  
00038   return os;
00039 }


Generated on Tue Jun 9 17:52:21 2009 for CMSSW by  doxygen 1.5.4