CMS 3D CMS Logo

Functions
ForwardName Namespace Reference

Functions

std::string getName (const G4String &)
 

Function Documentation

◆ getName()

std::string ForwardName::getName ( const G4String &  namx)

Definition at line 3 of file ForwardName.cc.

References dqmdumpme::first, dqmdumpme::last, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by cms::alpakatools::CachingAllocator< TDev, TQueue >::allocateNewBlock(), ALPAKA_ACCELERATOR_NAMESPACE::AlpakaService::AlpakaService(), CaloTowersDQMClient::CaloTowersEndjob(), CaloTowersClient::CaloTowersEndjob(), jsoncollector::FastMonitor::commit(), FWGUIManager::createHelpGLPopup(), FWGUIManager::createShortcutPopup(), HGCalDigiClient::digisEndjob(), JetMETHLTOfflineClient::dqmEndJob(), StraightTrackAlignment::finish(), cms::alpakatools::CachingAllocator< TDev, TQueue >::free(), cms::alpakatools::CachingAllocator< TDev, TQueue >::freeAllCached(), HGCalGeometryClient::geometryEndjob(), HGCalHitClient::geometryEndjob(), ZdcSD::getEnergyDeposit(), TotemT2OrganizationGem::getUnitID(), TotemT1Organization::getUnitID(), HcalDigisClient::HcalDigisEndjob(), HcalRecHitsDQMClient::HcalRecHitsEndjob(), NoiseRatesClient::NoiseRatesEndjob(), HcalNoiseRatesClient::NoiseRatesEndjob(), GenericMVAComputer::TaggingVariableIterator< Iter_t >::Value::operator PhysicsTools::Variable::Value(), StraightTrackAlignment::printAlgorithmsLine(), HGCalRecHitsClient::recHitsEndjob(), Bcm1fSD::setDetUnitId(), PltSD::setDetUnitId(), HcalSimHitsClient::SimHitsEndjob(), HGCalSimHitsClient::simHitsEndjob(), and cms::alpakatools::CachingAllocator< TDev, TQueue >::tryReuseCachedBlock().

3  {
4  std::string name = static_cast<std::string>(namx);
5  if (name.find(':') == std::string::npos) {
6  return name;
7  } else {
8  std::size_t first = name.find(':') + 1;
9  std::size_t last = name.rfind('_');
10  std::size_t length = (last != std::string::npos) ? (last - first) : (name.size() - first);
11  return name.substr(first, length);
12  }
13 }