ATLAS Offline Software
Functions
TDTUtilities_impl Namespace Reference

Functions

std::vector< std::string > split (const std::string &line)
 

Function Documentation

◆ split()

std::vector<std::string> TDTUtilities_impl::split ( const std::string &  line)

Definition at line 24 of file TDTUtilities.cxx.

24  {
25  std::vector<std::string> res;
26  std::string::size_type old_pos = 0, pos = line.find(',',0);
27  while( pos != std::string::npos ) {
28  res.push_back(line.substr(old_pos,pos-old_pos));
29  old_pos = pos + 1;
30  pos = line.find(',', old_pos);
31  }
32  // last entry
33  if (old_pos < line.size())
34  res.push_back(line.substr(old_pos,line.size()-old_pos));
35  return res;
36  }
checkFileSG.line
line
Definition: checkFileSG.py:75
res
std::pair< std::vector< unsigned int >, bool > res
Definition: JetGroupProductTest.cxx:14
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18