MCPcopy Create free account
hub / github.com/Kitware/VTK / Write

Method Write

Rendering/ParallelLIC/vtkParallelTimer.cxx:604–628  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

602
603//------------------------------------------------------------------------------
604int 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//------------------------------------------------------------------------------
631void vtkParallelTimer::PrintSelf(ostream& os, vtkIndent)

Callers 5

WriteTimerLogMethod · 0.45
WriteTimerLogMethod · 0.45
SaveAsPNGMethod · 0.45
RenderMethod · 0.45
RenderMethod · 0.45

Calls 4

GetSizeMethod · 0.45
goodMethod · 0.45
strMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected