diff data/model/AlignmentModel.cpp @ 1075:c1b522cfd1ff

More optional debug out
author Chris Cannam
date Fri, 05 Jun 2015 10:00:26 +0100
parents 0fd3661bcfff
children 48e9f538e6e9
line wrap: on
line diff
--- a/data/model/AlignmentModel.cpp	Thu May 21 16:38:52 2015 +0100
+++ b/data/model/AlignmentModel.cpp	Fri Jun 05 10:00:26 2015 +0100
@@ -139,7 +139,7 @@
 AlignmentModel::toReference(sv_frame_t frame) const
 {
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::toReference(" << frame << ")" << endl;
+    cerr << "AlignmentModel::toReference(" << frame << ")" << endl;
 #endif
     if (!m_path) {
         if (!m_rawPath) return frame;
@@ -152,7 +152,7 @@
 AlignmentModel::fromReference(sv_frame_t frame) const
 {
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::fromReference(" << frame << ")" << endl;
+    cerr << "AlignmentModel::fromReference(" << frame << ")" << endl;
 #endif
     if (!m_reversePath) {
         if (!m_rawPath) return frame;
@@ -192,7 +192,7 @@
         m_rawPath->isReady(&completion);
 
 #ifdef DEBUG_ALIGNMENT_MODEL
-        SVDEBUG << "AlignmentModel::pathCompletionChanged: completion = "
+        cerr << "AlignmentModel::pathCompletionChanged: completion = "
                   << completion << endl;
 #endif
 
@@ -240,7 +240,7 @@
     }
 
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::constructPath: " << m_path->getPointCount() << " points, at least " << (2 * m_path->getPointCount() * (3 * sizeof(void *) + sizeof(int) + sizeof(PathPoint))) << " bytes" << endl;
+    cerr << "AlignmentModel::constructPath: " << m_path->getPointCount() << " points, at least " << (2 * m_path->getPointCount() * (3 * sizeof(void *) + sizeof(int) + sizeof(PathPoint))) << " bytes" << endl;
 #endif
 }
 
@@ -271,7 +271,7 @@
     }
 
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::constructReversePath: " << m_reversePath->getPointCount() << " points, at least " << (2 * m_reversePath->getPointCount() * (3 * sizeof(void *) + sizeof(int) + sizeof(PathPoint))) << " bytes" << endl;
+    cerr << "AlignmentModel::constructReversePath: " << m_reversePath->getPointCount() << " points, at least " << (2 * m_reversePath->getPointCount() * (3 * sizeof(void *) + sizeof(int) + sizeof(PathPoint))) << " bytes" << endl;
 #endif
 }
 
@@ -289,13 +289,13 @@
 
     if (points.empty()) {
 #ifdef DEBUG_ALIGNMENT_MODEL
-        SVDEBUG << "AlignmentModel::align: No points" << endl;
+        cerr << "AlignmentModel::align: No points" << endl;
 #endif
         return frame;
     }        
 
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::align: frame " << frame << " requested" << endl;
+    cerr << "AlignmentModel::align: frame " << frame << " requested" << endl;
 #endif
 
     PathModel::Point point(frame);
@@ -326,6 +326,12 @@
 #endif
     }        
 
+#ifdef DEBUG_ALIGNMENT_MODEL
+    cerr << "foundFrame = " << foundFrame << ", foundMapFrame = " << foundMapFrame
+         << ", followingFrame = " << followingFrame << ", followingMapFrame = "
+         << followingMapFrame << endl;
+#endif
+    
     if (foundMapFrame < 0) return 0;
 
     sv_frame_t resultFrame = foundMapFrame;
@@ -338,7 +344,7 @@
     }
 
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::align: resultFrame = " << resultFrame << endl;
+    cerr << "AlignmentModel::align: resultFrame = " << resultFrame << endl;
 #endif
 
     return resultFrame;
@@ -376,11 +382,11 @@
     delete m_path;
     m_path = path;
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::setPath: path = " << m_path << endl;
+    cerr << "AlignmentModel::setPath: path = " << m_path << endl;
 #endif
     constructReversePath();
 #ifdef DEBUG_ALIGNMENT_MODEL
-    SVDEBUG << "AlignmentModel::setPath: after construction path = "
+    cerr << "AlignmentModel::setPath: after construction path = "
               << m_path << ", rpath = " << m_reversePath << endl;
 #endif
 }