Add a small bit of structure to assist in debugging two crashes near the poles.
This commit is contained in:
parent
8524cf7e76
commit
02de050a9b
1 changed files with 13 additions and 2 deletions
|
@ -233,6 +233,7 @@ usage ()
|
||||||
cerr << "--work-dir=<dir> (default: .)" << endl;
|
cerr << "--work-dir=<dir> (default: .)" << endl;
|
||||||
cerr << "--att=<item>:<value> (may be repeated)" << endl;
|
cerr << "--att=<item>:<value> (may be repeated)" << endl;
|
||||||
cerr << "--att=!<item>:<value> (may be repeated)" << endl;
|
cerr << "--att=!<item>:<value> (may be repeated)" << endl;
|
||||||
|
cerr << "--start-index=<num> (default: 0)" << endl;
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,6 +291,7 @@ main (int argc, const char **argv)
|
||||||
string work_dir = ".";
|
string work_dir = ".";
|
||||||
double min_area = -1;
|
double min_area = -1;
|
||||||
double max_area = -1;
|
double max_area = -1;
|
||||||
|
int start_index = 0;
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -371,6 +373,11 @@ main (int argc, const char **argv)
|
||||||
argPos++;
|
argPos++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (arg.find("--start-index=") == 0) {
|
||||||
|
start_index = atoi(arg.substr(14).c_str());
|
||||||
|
argPos++;
|
||||||
|
}
|
||||||
|
|
||||||
else if (arg == "--") {
|
else if (arg == "--") {
|
||||||
argPos++;
|
argPos++;
|
||||||
break;
|
break;
|
||||||
|
@ -438,6 +445,9 @@ main (int argc, const char **argv)
|
||||||
<< (attributes[x].state ? " = " : " != ")
|
<< (attributes[x].state ? " = " : " != ")
|
||||||
<< attributes[x].value << endl;
|
<< attributes[x].value << endl;
|
||||||
}
|
}
|
||||||
|
if ( start_index > 0 ) {
|
||||||
|
cout << "Starting at index = " << start_index << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -469,12 +479,13 @@ main (int argc, const char **argv)
|
||||||
long start_sec = start.get_seconds();
|
long start_sec = start.get_seconds();
|
||||||
|
|
||||||
TGPolygon mask;
|
TGPolygon mask;
|
||||||
for (int i = 0; i < nTopologies; i++) {
|
for (int i = start_index; i < nTopologies; i++) {
|
||||||
if ((i % 50) == 0) {
|
if ((i % 10) == 0) {
|
||||||
now.stamp();
|
now.stamp();
|
||||||
long now_sec = now.get_seconds();
|
long now_sec = now.get_seconds();
|
||||||
double elapsed_min = (now_sec - start_sec) / 60.0;
|
double elapsed_min = (now_sec - start_sec) / 60.0;
|
||||||
double percent = (double)i / (double)nTopologies;
|
double percent = (double)i / (double)nTopologies;
|
||||||
|
cerr << i << "# ";
|
||||||
cerr << percent*100.0 << "% done ...";
|
cerr << percent*100.0 << "% done ...";
|
||||||
cerr << " total time = " << elapsed_min / percent;
|
cerr << " total time = " << elapsed_min / percent;
|
||||||
cerr << " (min) finished in " << elapsed_min / percent - elapsed_min
|
cerr << " (min) finished in " << elapsed_min / percent - elapsed_min
|
||||||
|
|
Loading…
Reference in a new issue