Commit 650753df authored by thomas.forbriger's avatar thomas.forbriger
Browse files

croposp [WP]: add debug output of series index range

parent 6ee035e4
......@@ -21,6 +21,7 @@
#include <iostream>
#include <tfxx/commandline.h>
#include <tfxx/error.h>
#include <tfxx/misc.h>
#include <tsioxx/cmdlinefiles.h>
#include <tsxx/tscollection.h>
......@@ -38,7 +39,8 @@ typedef ts::TimeSeriesCollection<double> TCollection;
/* ====================================================================== */
void report_collection(const TCollection& collection)
void report_collection(const TCollection& collection,
const bool& debug=false)
{
TCollection::const_iterator i_series=collection.begin();
while (i_series != collection.end())
......@@ -51,6 +53,12 @@ void report_collection(const TCollection& collection)
<< "begin: " << i_series->header.date.timestring() << " "
<< "n: " << i_series->header.nsamples
<< endl;
TFXX_debug(debug, "report_collection",
TFXX_value(i_series->f())
<< " " <<
TFXX_value(i_series->l())
<< " " <<
TFXX_value(i_series->size()));
++i_series;
}
} // void report_collection(const Tcollection& collection)
......@@ -196,7 +204,7 @@ int main(int iargc, char* argv[])
if (opt.verbose)
{
cout << "Time series after trimming:" << endl;
report_collection(collection_of_series);
report_collection(collection_of_series, opt.debug);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment