CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/DetectorDescription/Core/src/DDMap.cc

Go to the documentation of this file.
00001 #include "DetectorDescription/Core/interface/DDMap.h"
00002 
00003 DDMap::DDMap() : DDBase<DDName,dd_map_type*>() { }
00004 
00005 
00006 DDMap::DDMap(const DDName & name) : DDBase<DDName,dd_map_type*>() 
00007 {
00008   prep_ = StoreT::instance().create(name);
00009 }
00010 
00011 DDMap::DDMap(const DDName & name,dd_map_type* vals)
00012 {
00013   prep_ = StoreT::instance().create(name,vals);
00014 }  
00015 
00016 
00017 std::ostream & operator<<(std::ostream & os, const DDMap & cons)
00018 {
00019   os << "DDMap name=" << cons.name(); 
00020   
00021   if(cons.isDefined().second) {
00022     os << " size=" << cons.size() << " vals=( ";
00023     DDMap::value_type::const_iterator it(cons.values().begin()), ed(cons.values().end());
00024     for(; it != ed; ++it) {
00025       os << it->first << '=' << it->second << ' ';
00026     }
00027     os << ')';
00028   }
00029   else {
00030     os << " DDMap is not yet defined, only declared.";
00031   }  
00032   return os;
00033 }
00034 
00035