diff framework/SVFileReader.cpp @ 229:8c13e8219903 debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:40 +0100
parents 67cea66bd588
children 8aace2d9f1c2
line wrap: on
line diff
--- a/framework/SVFileReader.cpp	Thu May 12 17:31:56 2011 +0100
+++ b/framework/SVFileReader.cpp	Mon May 16 17:19:40 2011 +0100
@@ -442,7 +442,7 @@
 
     QString name = attributes.value("name");
 
-    std::cerr << "SVFileReader::readModel: model name \"" << name << "\"" << std::endl;
+    DEBUG << "SVFileReader::readModel: model name \"" << name << "\"" << endl;
 
     READ_MANDATORY(int, sampleRate, toInt);
 
@@ -954,7 +954,7 @@
 
     READ_MANDATORY(int, frame, toInt);
 
-//    std::cerr << "SVFileReader::addPointToDataset: frame = " << frame << std::endl;
+//    DEBUG << "SVFileReader::addPointToDataset: frame = " << frame << endl;
 
     SparseOneDimensionalModel *sodm = dynamic_cast<SparseOneDimensionalModel *>
 	(m_currentDataset);
@@ -1016,7 +1016,7 @@
 	float height = 0.0;
 	height = attributes.value("height").trimmed().toFloat(&ok);
 	QString label = attributes.value("label");
-//        std::cerr << "SVFileReader::addPointToDataset: TextModel: frame = " << frame << ", height = " << height << ", label = " << label << ", ok = " << ok << std::endl;
+//        DEBUG << "SVFileReader::addPointToDataset: TextModel: frame = " << frame << ", height = " << height << ", label = " << label << ", ok = " << ok << endl;
 	tm->addPoint(TextModel::Point(frame, height, label));
 	return ok;
     }
@@ -1026,7 +1026,7 @@
     if (pm) {
 //        std::cerr << "Current dataset is a path model" << std::endl;
         int mapframe = attributes.value("mapframe").trimmed().toInt(&ok);
-//        std::cerr << "SVFileReader::addPointToDataset: PathModel: frame = " << frame << ", mapframe = " << mapframe << ", ok = " << ok << std::endl;
+//        DEBUG << "SVFileReader::addPointToDataset: PathModel: frame = " << frame << ", mapframe = " << mapframe << ", ok = " << ok << endl;
 	pm->addPoint(PathModel::Point(frame, mapframe));
 	return ok;
     }
@@ -1037,7 +1037,7 @@
 //        std::cerr << "Current dataset is an image model" << std::endl;
 	QString image = attributes.value("image");
 	QString label = attributes.value("label");
-//        std::cerr << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << std::endl;
+//        DEBUG << "SVFileReader::addPointToDataset: ImageModel: frame = " << frame << ", image = " << image << ", label = " << label << ", ok = " << ok << endl;
 	im->addPoint(ImageModel::Point(frame, image, label));
 	return ok;
     }
@@ -1185,8 +1185,8 @@
         return true;
     } else {
         m_currentTransformIsNewStyle = false;
-        std::cerr << "NOTE: SV-XML: Reading old-style derivation element"
-                  << std::endl;
+        DEBUG << "NOTE: SV-XML: Reading old-style derivation element"
+                  << endl;
     }
 
     QString transformId = attributes.value("transform");
@@ -1368,8 +1368,8 @@
 bool
 SVFileReader::readMeasurement(const QXmlAttributes &attributes)
 {
-    std::cerr << "SVFileReader::readMeasurement: inLayer "
-              << m_inLayer << ", layer " << m_currentLayer << std::endl;
+    DEBUG << "SVFileReader::readMeasurement: inLayer "
+              << m_inLayer << ", layer " << m_currentLayer << endl;
 
     if (!m_inLayer) {
         std::cerr << "WARNING: SV-XML: Measurement found outside layer" << std::endl;