Mercurial > hg > svcore
comparison rdf/RDFFeatureWriter.cpp @ 687:06f13a3b9e9e debug-output
Convert many cerrs to DEBUGs
author | Chris Cannam |
---|---|
date | Mon, 16 May 2011 17:19:09 +0100 |
parents | b4a8d8221eaf |
children | 1424aa29ae95 |
comparison
equal
deleted
inserted
replaced
686:b4a8d8221eaf | 687:06f13a3b9e9e |
---|---|
139 } | 139 } |
140 | 140 |
141 m_rdfDescriptions[pluginId] = PluginRDFDescription(pluginId); | 141 m_rdfDescriptions[pluginId] = PluginRDFDescription(pluginId); |
142 | 142 |
143 if (m_rdfDescriptions[pluginId].haveDescription()) { | 143 if (m_rdfDescriptions[pluginId].haveDescription()) { |
144 cerr << "NOTE: Have RDF description for plugin ID \"" | 144 DEBUG << "NOTE: Have RDF description for plugin ID \"" |
145 << pluginId << "\"" << endl; | 145 << pluginId << "\"" << endl; |
146 } else { | 146 } else { |
147 cerr << "NOTE: No RDF description for plugin ID \"" | 147 DEBUG << "NOTE: No RDF description for plugin ID \"" |
148 << pluginId << "\"" << endl; | 148 << pluginId << "\"" << endl; |
149 if (!m_network) { | 149 if (!m_network) { |
150 cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; | 150 cerr << " Consider using the --rdf-network option to retrieve plugin descriptions" << endl; |
151 cerr << " from the network where possible." << endl; | 151 cerr << " from the network where possible." << endl; |
152 } | 152 } |
290 | 290 |
291 void | 291 void |
292 RDFFeatureWriter::writeSignalDescription(QTextStream *sptr, | 292 RDFFeatureWriter::writeSignalDescription(QTextStream *sptr, |
293 QString trackId) | 293 QString trackId) |
294 { | 294 { |
295 // std::cerr << "RDFFeatureWriter::writeSignalDescription" << std::endl; | 295 // DEBUG << "RDFFeatureWriter::writeSignalDescription" << endl; |
296 | 296 |
297 QTextStream &stream = *sptr; | 297 QTextStream &stream = *sptr; |
298 | 298 |
299 /* | 299 /* |
300 * Describe signal we're analysing (AudioFile, Signal, TimeLine, etc.) | 300 * Describe signal we're analysing (AudioFile, Signal, TimeLine, etc.) |
518 const Plugin::OutputDescriptor& od, | 518 const Plugin::OutputDescriptor& od, |
519 const Plugin::FeatureList& featureList, | 519 const Plugin::FeatureList& featureList, |
520 PluginRDFDescription &desc, | 520 PluginRDFDescription &desc, |
521 QString timelineURI) | 521 QString timelineURI) |
522 { | 522 { |
523 // std::cerr << "RDFFeatureWriter::writeSparseRDF: have " << featureList.size() << " features" << std::endl; | 523 // DEBUG << "RDFFeatureWriter::writeSparseRDF: have " << featureList.size() << " features" << endl; |
524 | 524 |
525 if (featureList.empty()) return; | 525 if (featureList.empty()) return; |
526 QTextStream &stream = *sptr; | 526 QTextStream &stream = *sptr; |
527 | 527 |
528 bool plain = (m_plain || !desc.haveDescription()); | 528 bool plain = (m_plain || !desc.haveDescription()); |
619 | 619 |
620 QString outputId = od.identifier.c_str(); | 620 QString outputId = od.identifier.c_str(); |
621 QString featureUri = desc.getOutputFeatureAttributeURI(outputId); | 621 QString featureUri = desc.getOutputFeatureAttributeURI(outputId); |
622 | 622 |
623 if (featureUri == "") { | 623 if (featureUri == "") { |
624 cerr << "RDFFeatureWriter::writeTrackLevelRDF: ERROR: No feature URI available -- this function should not have been called!" << endl; | 624 DEBUG << "RDFFeatureWriter::writeTrackLevelRDF: ERROR: No feature URI available -- this function should not have been called!" << endl; |
625 return; | 625 return; |
626 } | 626 } |
627 | 627 |
628 for (int i = 0; i < featureList.size(); ++i) { | 628 for (int i = 0; i < featureList.size(); ++i) { |
629 | 629 |
763 } | 763 } |
764 } | 764 } |
765 | 765 |
766 void RDFFeatureWriter::finish() | 766 void RDFFeatureWriter::finish() |
767 { | 767 { |
768 // cerr << "RDFFeatureWriter::finish()" << endl; | 768 // DEBUG << "RDFFeatureWriter::finish()" << endl; |
769 | 769 |
770 // close any open dense feature literals | 770 // close any open dense feature literals |
771 | 771 |
772 for (map<StringTransformPair, StreamBuffer>::iterator i = | 772 for (map<StringTransformPair, StreamBuffer>::iterator i = |
773 m_openDenseFeatures.begin(); | 773 m_openDenseFeatures.begin(); |
774 i != m_openDenseFeatures.end(); ++i) { | 774 i != m_openDenseFeatures.end(); ++i) { |
775 // cerr << "closing a stream" << endl; | 775 // DEBUG << "closing a stream" << endl; |
776 StreamBuffer &b = i->second; | 776 StreamBuffer &b = i->second; |
777 *(b.first) << b.second << "\" ." << endl; | 777 *(b.first) << b.second << "\" ." << endl; |
778 } | 778 } |
779 | 779 |
780 m_openDenseFeatures.clear(); | 780 m_openDenseFeatures.clear(); |