------------------------------------------------------------------------------
| 602 | |
| 603 | //------------------------------------------------------------------------------ |
| 604 | int vtkParallelTimer::Write() |
| 605 | { |
| 606 | #if vtkParallelTimerDEBUG > 1 |
| 607 | std::cerr << "=====vtkParallelTimer::Write" << endl; |
| 608 | #endif |
| 609 | |
| 610 | if ((this->WorldRank == this->WriterRank) && this->Log->GetSize()) |
| 611 | { |
| 612 | std::cerr << "Wrote " << this->FileName << endl; |
| 613 | |
| 614 | ostringstream oss; |
| 615 | *this->Log >> oss; |
| 616 | vtksys::ofstream f(this->FileName, ios_base::out | ios_base::app); |
| 617 | if (!f.good()) |
| 618 | { |
| 619 | vtkErrorMacro(<< "Failed to open " << this->FileName << " for writing."); |
| 620 | return -1; |
| 621 | } |
| 622 | time_t t; |
| 623 | time(&t); |
| 624 | f << "# " << ctime(&t) << this->HeaderBuffer.str() << oss.str(); |
| 625 | f.close(); |
| 626 | } |
| 627 | return 0; |
| 628 | } |
| 629 | |
| 630 | //------------------------------------------------------------------------------ |
| 631 | void vtkParallelTimer::PrintSelf(ostream& os, vtkIndent) |
no test coverage detected