diff layer/Colour3DPlotLayer.cpp @ 585:f4960f8ce798 debug-output

Convert many cerrs to DEBUGs
author Chris Cannam
date Mon, 16 May 2011 17:19:25 +0100
parents be5c35d3f409
children 4806715f7a19
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.cpp	Thu May 12 17:31:43 2011 +0100
+++ b/layer/Colour3DPlotLayer.cpp	Mon May 16 17:19:25 2011 +0100
@@ -493,8 +493,8 @@
     if (dormant) {
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-        std::cerr << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")"
-                  << std::endl;
+        DEBUG << "Colour3DPlotLayer::setLayerDormant(" << dormant << ")"
+                  << endl;
 #endif
 
         if (isLayerDormant(v)) {
@@ -588,7 +588,7 @@
 {
     if (!m_model) return;
 
-//    std::cerr << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): before: miny = " << m_miny << ", maxy = " << m_maxy << std::endl;
+//    DEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"): before: miny = " << m_miny << ", maxy = " << m_maxy << endl;
 
     int dist = m_model->getHeight() - step;
     if (dist < 1) dist = 1;
@@ -598,7 +598,7 @@
     m_maxy = m_miny + dist;
     if (m_maxy > m_model->getHeight()) m_maxy = m_model->getHeight();
 
-//    std::cerr << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"):  after: miny = " << m_miny << ", maxy = " << m_maxy << std::endl;
+//    DEBUG << "Colour3DPlotLayer::setVerticalZoomStep(" <<step <<"):  after: miny = " << m_miny << ", maxy = " << m_maxy << endl;
     
     emit layerParametersChanged();
 }
@@ -918,7 +918,7 @@
     size_t modelResolution = m_model->getResolution();
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    std::cerr << "Colour3DPlotLayer::fillCache: " << firstBin << " -> " << lastBin << std::endl;
+    DEBUG << "Colour3DPlotLayer::fillCache: " << firstBin << " -> " << lastBin << endl;
 #endif
 
     size_t modelStartBin = modelStart / modelResolution;
@@ -1152,12 +1152,12 @@
 {
 /*
     if (m_model) {
-        std::cerr << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << std::endl;
+        DEBUG << "Colour3DPlotLayer::paint: model says shouldUseLogValueScale = " << m_model->shouldUseLogValueScale() << endl;
     }
 */
     Profiler profiler("Colour3DPlotLayer::paint");
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    std::cerr << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << std::endl;
+    DEBUG << "Colour3DPlotLayer::paint(): m_model is " << m_model << ", zoom level is " << v->getZoomLevel() << endl;
 #endif
 
     int completion = 0;
@@ -1213,7 +1213,7 @@
               sx1 < 0 ? 0 : sx1);
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    std::cerr << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", modelStart = " << modelStart << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << " (zoom level = " << v->getZoomLevel() << ", srRatio = " << srRatio << ")" << std::endl;
+    DEBUG << "Colour3DPlotLayer::paint: height = "<< m_model->getHeight() << ", modelStart = " << modelStart << ", resolution = " << modelResolution << ", model rate = " << m_model->getSampleRate() << " (zoom level = " << v->getZoomLevel() << ", srRatio = " << srRatio << ")" << endl;
 #endif
 
     if (m_opaque || 
@@ -1221,14 +1221,14 @@
         int(m_model->getHeight()) >= v->height() ||
         ((modelResolution * srRatio) / v->getZoomLevel()) < 2) {
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-        std::cerr << "calling paintDense" << std::endl;
+        DEBUG << "calling paintDense" << endl;
 #endif
         paintDense(v, paint, rect);
         return;
     }
 
 #ifdef DEBUG_COLOUR_3D_PLOT_LAYER_PAINT
-    std::cerr << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << std::endl;
+    DEBUG << "Colour3DPlotLayer::paint: w " << x1-x0 << ", h " << h << ", sx0 " << sx0 << ", sx1 " << sx1 << ", sw " << sx1-sx0 << ", sh " << sh << endl;
     std::cerr << "Colour3DPlotLayer: sample rate is " << m_model->getSampleRate() << ", resolution " << m_model->getResolution() << std::endl;
 #endif
 
@@ -1358,7 +1358,7 @@
 
     if (m_peaksCache) {
         if (((modelResolution * srRatio * m_peakResolution) / zoomLevel) < 1) {
-            std::cerr << "using peaks cache" << std::endl;
+            DEBUG << "using peaks cache" << endl;
             source = m_peaksCache;
             modelResolution *= m_peakResolution;
         } else {