Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:16:00

0001 #include "PHPy8GenTrigger.h"
0002 
0003 #include <sstream>
0004 
0005 //__________________________________________________________
0006 PHPy8GenTrigger::PHPy8GenTrigger(const std::string& name)
0007   : m_Verbosity(0)
0008   , m_Name(name)
0009 {
0010 }
0011 
0012 //__________________________________________________________
0013 std::vector<int> PHPy8GenTrigger::convertToInts(const std::string& s)
0014 {
0015   std::vector<int> theVec;
0016   std::stringstream ss(s);
0017   int i;
0018   while (ss >> i)
0019   {
0020     theVec.push_back(i);
0021     if (ss.peek() == ',' ||
0022         ss.peek() == ' ' ||
0023         ss.peek() == ':' ||
0024         ss.peek() == ';')
0025     {
0026       ss.ignore();
0027     }
0028   }
0029 
0030   return theVec;
0031 }