CMS 3D CMS Logo

Functions
CaloSimUtils Namespace Reference

Functions

std::vector< std::string > splitString (const std::string &)
 

Function Documentation

◆ splitString()

std::vector< std::string > CaloSimUtils::splitString ( const std::string &  fLine)

Definition at line 3 of file CaloSimUtils.cc.

References relativeConstraints::empty, mps_fire::i, B2GTnPMonitor_cfi::item, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EgHLTOfflineClient::createLooseTightTrigEff(), HcalDbASCIIIO::createObject< HcalDcsMap >(), HcalDbASCIIIO::createObject< HcalElectronicsMap >(), HcalDbASCIIIO::createObject< HcalFrontEndMap >(), HcalDbASCIIIO::createObject< HcalSiPMCharacteristics >(), CastorDbASCIIIO::getCastorObject(), CastorDbASCIIIO::getCastorSingleFloatObject(), CastorDbASCIIIO::getCastorSingleIntObject(), getHcalDoubleFloatObject(), getHcalMatrixObject(), getHcalObject(), getHcalSingleObject(), HcalQIEManager::getHfQieTable(), CastorDbASCIIIO::getObject(), HcalQIEManager::getQIETableFromFile(), HGCalNumberingScheme::HGCalNumberingScheme(), HGCScintSD::HGCScintSD(), egHLT::MonElemFuncs::initTightLooseDiObjTrigHistsTrigCuts(), egHLT::MonElemFuncs::initTightLooseTrigHists(), and egHLT::MonElemFuncs::initTightLooseTrigHistsTrigCuts().

3  {
4  std::vector<std::string> result;
5  int start = 0;
6  bool empty = true;
7  for (unsigned i = 0; i <= fLine.size(); i++) {
8  if (fLine[i] == ' ' || i == fLine.size()) {
9  if (!empty) {
10  std::string item(fLine, start, i - start);
11  result.emplace_back(item);
12  empty = true;
13  }
14  start = i + 1;
15  } else {
16  if (empty)
17  empty = false;
18  }
19  }
20  return result;
21 }
Definition: start.py:1