Mercurial > hg > svcore
diff rdf/RDFFeatureWriter.cpp @ 512:e7a39c45a7a4
* close output streams a little sooner when writing features for more
than one file (doesn't affect eventual output though)
author | Chris Cannam |
---|---|
date | Tue, 09 Dec 2008 16:53:37 +0000 |
parents | af7b6e55895b |
children | 06a6612e7cf1 |
line wrap: on
line diff
--- a/rdf/RDFFeatureWriter.cpp Mon Dec 08 15:08:39 2008 +0000 +++ b/rdf/RDFFeatureWriter.cpp Tue Dec 09 16:53:37 2008 +0000 @@ -118,11 +118,16 @@ // combination QTextStream *stream = getOutputStream(trackId, transform.getIdentifier()); - if (!stream) return; //!!! this is probably better handled with an exception + if (!stream) { + std::cerr << "RDFFeatureWriter::write: ERROR: No output stream for track id \"" + << trackId.toStdString() << "\" and transform \"" + << transform.getIdentifier().toStdString() << "\"" << std::endl; + return; + } if (m_startedStreamTransforms.find(stream) == m_startedStreamTransforms.end()) { - cerr << "This stream is new, writing prefixes" << endl; +// cerr << "This stream is new, writing prefixes" << endl; writePrefixes(stream); if (m_singleFileName == "" && !m_stdout) { writeSignalDescription(stream, trackId); @@ -410,6 +415,8 @@ PluginRDFDescription &desc, QString timelineURI) { +// std::cerr << "RDFFeatureWriter::writeSparseRDF: have " << featureList.size() << " features" << std::endl; + if (featureList.empty()) return; QTextStream &stream = *sptr; @@ -656,7 +663,7 @@ for (map<StringTransformPair, StreamBuffer>::iterator i = m_openDenseFeatures.begin(); i != m_openDenseFeatures.end(); ++i) { - cerr << "closing a stream" << endl; +// cerr << "closing a stream" << endl; StreamBuffer &b = i->second; *(b.first) << b.second << "\" ." << endl; }