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 25 of file TDTUtilities.cxx.

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