CMS 3D CMS Logo

Functions
Ph1PMapSummaryHelper Namespace Reference

Functions

std::vector< std::string > tokenize (std::string line, char delimiter)
 

Function Documentation

◆ tokenize()

std::vector<std::string> Ph1PMapSummaryHelper::tokenize ( std::string  line,
char  delimiter 
)
inline

Definition at line 40 of file Phase1PixelSummaryMap.h.

References makeHLTPrescaleTable::delimiter, mps_splice::line, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by Phase1PixelSummaryMap::addNamedBins(), and PasswordReader::readPassword().

40  {
41  // Vector of string to save tokens
42  std::vector<std::string> tokens;
43  std::stringstream check1(line);
44  std::string intermediate;
45 
46  // Tokenizing w.r.t. delimiter
47  while (getline(check1, intermediate, delimiter)) {
48  tokens.push_back(intermediate);
49  }
50  return tokens;
51  }