| 688 | } |
| 689 | |
| 690 | void OSWorkflow::communicateResults() const { |
| 691 | if (!workflowJSON.runOptions()->skipZipResults()) { |
| 692 | if (m_add_timings) { |
| 693 | m_timers->newTimer("Zip datapoint"); |
| 694 | } |
| 695 | openstudio::workflow::util::zipResults(workflowJSON.absoluteRunDir()); |
| 696 | if (m_add_timings) { |
| 697 | m_timers->tockCurrentTimer(); |
| 698 | } |
| 699 | } |
| 700 | |
| 701 | const Json::Value root = outputAttributesToJSON(output_attributes, true); |
| 702 | Json::StreamWriterBuilder wbuilder; |
| 703 | // mimic the old StyledWriter behavior: |
| 704 | wbuilder["indentation"] = " "; |
| 705 | |
| 706 | const std::string result = Json::writeString(wbuilder, root); |
| 707 | |
| 708 | auto jsonPath = workflowJSON.absoluteRunDir() / "data_point_out.json"; |
| 709 | openstudio::filesystem::ofstream file(jsonPath); |
| 710 | OS_ASSERT(file.is_open()); |
| 711 | file << result; |
| 712 | file.close(); |
| 713 | } |
| 714 | |
| 715 | } // namespace openstudio |
nothing calls this directly
no test coverage detected