CMS 3D CMS Logo

DDutils.cc File Reference

#include "DetectorDescription/Base/interface/DDutils.h"
#include <vector>
#include <string>
#include <sstream>

Go to the source code of this file.

Functions

std::vector< intdbl_to_int (const std::vector< double > &vecdbl)
 Converts a std::vector of doubles to a std::vector of int.
std::string dbl_to_string (const double &in)
 Converts only the integer part of a double to a string.
std::string int_to_string (const int &in)


Function Documentation

std::vector<int> dbl_to_int ( const std::vector< double > &  vecdbl  ) 

Converts a std::vector of doubles to a std::vector of int.

Definition at line 6 of file DDutils.cc.

Referenced by DDHCalEndcapAlgo::initialize(), DDHCalBarrelAlgo::initialize(), and DDHCalForwardAlgo::initialize().

00006                                                               {
00007   std::vector<int> tInt;
00008   for (std::vector<double>::const_iterator vd_it = vecdbl.begin(); vd_it != vecdbl.end(); ++vd_it) {
00009     tInt.push_back(int(*vd_it));
00010   }
00011   return tInt;
00012 }

std::string dbl_to_string ( const double &  in  ) 

Converts only the integer part of a double to a string.

Definition at line 14 of file DDutils.cc.

References int_to_string().

Referenced by DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalAngular::execute(), DDTECAxialCableAlgo::execute(), DDHCalTBCableAlgo::execute(), DDHCalTBZposAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTECOptoHybAlgo::execute(), DDTECPhiAltAlgo::execute(), DDPixBarLayerAlgo::execute(), DDEcalBarrelAlgo::execute(), DDTIDAxialCableAlgo::execute(), DDTrackerPhiAltAlgo::execute(), DDTIBLayerAlgo::execute(), DDTIDModulePosAlgo::execute(), DDTIDRingAlgo::execute(), DDHCalForwardAlgo::execute(), DDTrackerAngular::execute(), DDTrackerPhiAlgo::execute(), DDTIBRadCableAlgo_MTCC::execute(), and DDTECPhiAlgo::execute().

00014                                            {
00015   return int_to_string( int (in) );
00016 }

std::string int_to_string ( const int in  ) 

Definition at line 18 of file DDutils.cc.

Referenced by DDEcalEndcapAlgo::alvName(), dbl_to_string(), DDEcalEndcapAlgo::EECreateSC(), DDEcalEndcapAlgo::EEPositionCRs(), DDEcalEndcapAlgo::envName(), DDTBH4Algo::execute(), DDPixFwdBlades::execute(), DDEcalBarrelAlgo::execute(), DDEcalEndcapAlgo::execute(), DDEcalEndcapAlgo::intName(), and DDEcalBarrelAlgo::web().

00018                                        {
00019 
00020   std::ostringstream ostr;
00021   ostr << in;
00022   return ostr.str();
00023 
00024 }


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