CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
DDutils.h File Reference
#include <string>
#include <vector>

Go to the source code of this file.

Functions

std::vector< int > dbl_to_int (const std::vector< double > &vecdbl)
 Converts a std::vector of doubles to a std::vector of int. More...
 
std::string dbl_to_string (const double &in)
 Converts only the integer part of a double to a string. More...
 
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 4 of file DDutils.cc.

Referenced by HcalParametersFromDD::build(), TrackerParametersFromDD::build(), DDHCalForwardAlgo::initialize(), DDHCalFibreBundle::initialize(), DDHGCalWaferAlgo::initialize(), DDHGCalModuleAlgo::initialize(), DDHGCalHEAlgo::initialize(), DDHCalEndcapModuleAlgo::initialize(), DDHGCalEEAlgo::initialize(), DDHCalBarrelAlgo::initialize(), DDHCalEndcapAlgo::initialize(), FastTimeDDDConstants::loadSpecPars(), HGCalGeomParameters::loadSpecParsHexagon(), HGCalGeomParameters::loadSpecParsSquare(), and TrackerGeometricDetESModule::produce().

4  {
5  std::vector<int> tInt;
6  for (std::vector<double>::const_iterator vd_it = vecdbl.begin(); vd_it != vecdbl.end(); ++vd_it) {
7  tInt.push_back(int(*vd_it));
8  }
9  return tInt;
10 }
std::string dbl_to_string ( const double &  in)

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

Definition at line 12 of file DDutils.cc.

References int_to_string().

Referenced by DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalEndcapAlgo::constructGeneralVolume(), DDHGCalModuleAlgo::constructLayers(), DDHGCalEEAlgo::constructLayers(), DDHGCalHEAlgo::constructLayers(), DDHGCalNoTaperEndcap::createQuarter(), DDAngular::execute(), DDTIDModulePosAlgo::execute(), DDHCalForwardAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTIBRadCableAlgo_MTCC::execute(), DDHCalTBCableAlgo::execute(), DDGEMAngular::execute(), DDTIBLayerAlgo::execute(), DDMuonAngular::execute(), DDPixBarStackLayerAlgo::execute(), DDHCalTBZposAlgo::execute(), DDPixBarLayerAlgo::execute(), DDPixBarLayerUpgradeAlgo::execute(), DDHCalAngular::execute(), DDPixFwdDiskAlgo::execute(), DDPixBarStackTrigLayerAlgo::execute(), DDTECOptoHybAlgo::execute(), DDPixBarTPGStackLayerAlgo::execute(), DDPixBarLayerUpgradeAlgoCoverage::execute(), DDHGCalWaferAlgo::execute(), DDTrackerAngularV1::execute(), DDTIDRingAlgo::execute(), DDTrackerPhiAltAlgo::execute(), DDTECAxialCableAlgo::execute(), DDTECPhiAltAlgo::execute(), DDHCalFibreBundle::execute(), DDTECPhiAlgo::execute(), DDTIDAxialCableAlgo::execute(), DDTrackerPhiAlgo::execute(), DDTrackerAngular::execute(), DDEcalBarrelNewAlgo::execute(), DDEcalBarrelAlgo::execute(), and DDTrackerRingAlgo::execute().

12  {
13  return int_to_string( int (in) );
14 }
std::string int_to_string(const int &in)
Definition: DDutils.cc:16
std::string int_to_string ( const int &  in)