CMS 3D CMS Logo

Classes | Typedefs | Functions

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/DetectorDescription/Core/interface/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 17 of file DDMap.cc.

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

{
  os << "DDMap name=" << cons.name(); 
  
  if(cons.isDefined().second) {
    os << " size=" << cons.size() << " vals=( ";
    DDMap::value_type::const_iterator it(cons.values().begin()), ed(cons.values().end());
    for(; it != ed; ++it) {
      os << it->first << '=' << it->second << ' ';
    }
    os << ')';
  }
  else {
    os << " DDMap is not yet defined, only declared.";
  }  
  return os;
}