CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
ForwardName Namespace Reference

Functions

std::string getName (const G4String &)
 

Function Documentation

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

Definition at line 3 of file ForwardName.cc.

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

Referenced by BHMNumberingScheme::detectorLevel(), BscNumberingScheme::detectorLevel(), ZdcNumberingScheme::detectorLevel(), ZdcSD::getEnergyDeposit(), TotemT2OrganizationGem::getUnitID(), TotemT1Organization::getUnitID(), Bcm1fSD::setDetUnitId(), and PltSD::setDetUnitId().

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 }
tuple last
Definition: dqmdumpme.py:56