11 const std::string&
file, MsgStream*
const log,
12 unsigned int numInts,
int numStrings,
unsigned int firstWildcard
14 m_linenumber(0), m_filename(
file), m_log(
log),
15 m_numInts(numInts), m_numStrings(numStrings),
16 m_firstWildcard(firstWildcard)
20 std::cerr <<
"ERROR \t LArBadChannelParser was given a NULL MsgStream pointer!" << std::endl;
30 std::string::size_type commentPosition =
line.find(
'#');
31 if(commentPosition != std::string::npos)
32 line.erase(commentPosition);
35 std::vector<std::string>
result;
37 std::istringstream stringIn(
line);
42 result.push_back(readWord);
50 return std::toupper((
unsigned char)
c);
66 if (
w.compare(0,3,
"EMB")==0 ||
w[0]==
'B')
74 else if (
w==
"C" ||
w==
"c")
80 if(canBeWildcard &&
w ==
"*")
82 else if(stringToNumber<int>(idComponent,
w) && idComponent >= 0)
83 result.push_back(idComponent);
86 (*m_log) << MSG::WARNING <<
"LArBadChannelParser REJECTED line " <<
m_linenumber \
87 <<
" -\t word " <<
i + 1 <<
" must be a non-negative integer " \
88 << (canBeWildcard ?
"or " :
"and not " ) \