CMS 3D CMS Logo

Functions

/data/refman/pasoursint/CMSSW_5_3_4/src/DetectorDescription/Core/interface/DDSplit.h File Reference

#include <string>
#include <utility>

Go to the source code of this file.

Functions

std::pair< std::string,
std::string > 
DDSplit (const std::string &n)
 split into (name,namespace), separator = ':'

Function Documentation

std::pair<std::string,std::string> DDSplit ( const std::string &  n)

split into (name,namespace), separator = ':'

Definition at line 4 of file DDSplit.cc.

References n, mergeVDriftHistosByStation::name, and pos.

Referenced by DDHCalEndcapAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructGeneralVolume(), DDHCalBarrelAlgo::constructInsideDetectors(), DDHCalBarrelAlgo::constructInsideLayers(), DDHCalEndcapAlgo::constructInsideModule(), DDHCalEndcapAlgo::constructInsideModule0(), DDHCalEndcapAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructInsideSector(), DDHCalBarrelAlgo::constructMidLayer(), DDHCalEndcapAlgo::constructScintLayer(), DDHCalBarrelAlgo::constructSideLayer(), DDEcalEndcapAlgo::ddname(), DDEcalBarrelAlgo::ddname(), DDTBH4Algo::ddname(), DDEcalBarrelNewAlgo::ddname(), DDEcalAPDAlgo::ddname(), DDName::DDName(), DDTokenize(), DDTECModuleAlgo::doPos(), DDTrackerZPosAlgo::execute(), DDPixFwdBlades::execute(), DDTECAxialCableAlgo::execute(), DDHCalTBCableAlgo::execute(), DDHCalTBZposAlgo::execute(), DDTOBRadCableAlgo::execute(), DDTIBLayerAlgo_MTCC::execute(), DDTECOptoHybAlgo::execute(), DDTECPhiAltAlgo::execute(), DDTrackerLinearXY::execute(), DDPixBarLayerAlgo::execute(), DDTIDModuleAlgo::execute(), DDTOBRodAlgo::execute(), DDTECModuleAlgo::execute(), DDTIDAxialCableAlgo::execute(), DDTrackerPhiAltAlgo::execute(), DDTrackerXYZPosAlgo::execute(), DDHCalLinearXY::execute(), DDTrackerLinear::execute(), DDTIBLayerAlgo::execute(), DDTIDModulePosAlgo::execute(), DDTIDRingAlgo::execute(), DDTOBAxCableAlgo::execute(), DDHCalFibreBundle::execute(), DDHCalForwardAlgo::execute(), DDTrackerAngular::execute(), DDTrackerPhiAlgo::execute(), DDTIBRadCableAlgo_MTCC::execute(), DDTECCoolAlgo::execute(), DDTECPhiAlgo::execute(), DDAngular::initialize(), and DDLinear::initialize().

{
  std::string name,ns;
  std::string::size_type pos = n.find(':');
  if (pos==std::string::npos) {
    ns = "";
    name = n;
  }
  else {
    ns = std::string(n,0,pos);
    name = std::string(n,pos+1,n.size()-1);
  }    
  return std::make_pair(name,ns);
}