Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:54:57

0001 #include "DetectorDescription/Core/interface/DDMap.h"
0002 
0003 #include <utility>
0004 
0005 DDMap::DDMap() : DDBase<DDName, std::unique_ptr<dd_map_type>>() {}
0006 
0007 DDMap::DDMap(const DDName& name) : DDBase<DDName, std::unique_ptr<dd_map_type>>() { create(name); }
0008 
0009 DDMap::DDMap(const DDName& name, std::unique_ptr<dd_map_type> vals) { create(name, std::move(vals)); }
0010 
0011 std::ostream& operator<<(std::ostream& os, const DDMap& cons) {
0012   os << "DDMap name=" << cons.name();
0013 
0014   if (cons.isDefined().second) {
0015     os << " size=" << cons.size() << " vals=( ";
0016     for (const auto& it : cons.values()) {
0017       os << it.first << '=' << it.second << ' ';
0018     }
0019     os << ')';
0020   } else {
0021     os << " DDMap is not yet defined, only declared.";
0022   }
0023   return os;
0024 }