Fixed ChangeLog
This commit is contained in:
@ -156,7 +156,7 @@ int PMsr2Data::DetermineRunNumberDigits(unsigned int runNo) const
|
||||
strLine.clear();
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!firstOnLine.compare("RUN")) {
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
string::size_type loc = line.rfind(tempRunNumber.str());
|
||||
if ( loc != string::npos ) {
|
||||
while ( --loc >= 0 ) {
|
||||
@ -527,7 +527,7 @@ bool PMsr2Data::PrepareNewInputFile(unsigned int tempRun) const
|
||||
strLine.clear();
|
||||
strLine.str(line);
|
||||
strLine >> firstOnLine;
|
||||
if (!firstOnLine.compare("RUN")) {
|
||||
if (!to_lower_copy(firstOnLine).compare("run")) {
|
||||
string::size_type loc = line.rfind(tempRunNumber.str());
|
||||
if ( loc != string::npos ) {
|
||||
line.replace(loc, fRunNumberDigits, newRunNumber.str());
|
||||
|
@ -59,17 +59,16 @@ using namespace boost::algorithm;
|
||||
*
|
||||
* \param s string
|
||||
*/
|
||||
bool isNumber(const string &s) // will be replaced by boost::lexical_cast at some time
|
||||
bool isNumber(const string &s)
|
||||
{
|
||||
unsigned int number;
|
||||
istringstream iss;
|
||||
ostringstream oss;
|
||||
iss.str(s);
|
||||
iss >> number;
|
||||
oss << number;
|
||||
if (iss.str().compare(oss.str()))
|
||||
try {
|
||||
number = boost::lexical_cast<unsigned int>(s);
|
||||
return true;
|
||||
}
|
||||
catch(boost::bad_lexical_cast &) {
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user