CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/DetectorDescription/Base/src/DDutils.cc

Go to the documentation of this file.
00001 #include "DetectorDescription/Base/interface/DDutils.h"
00002 #include <sstream>
00003 
00004 std::vector<int> dbl_to_int ( const std::vector<double> & vecdbl) {
00005   std::vector<int> tInt;
00006   for (std::vector<double>::const_iterator vd_it = vecdbl.begin(); vd_it != vecdbl.end(); ++vd_it) {
00007     tInt.push_back(int(*vd_it));
00008   }
00009   return tInt;
00010 }
00011 
00012 std::string dbl_to_string (const double& in) {
00013   return int_to_string( int (in) );
00014 }
00015 
00016 std::string int_to_string(const int& in) {
00017 
00018   std::ostringstream ostr;
00019   ostr << in;
00020   return ostr.str();
00021 
00022 }