WSF
engage::TaskOutput Class Reference

This class is the run-time output controller for the tasks. More...

#include <TaskOutput.hpp>

Public Types

typedef std::map< std::string, std::ostream * > OpenFileMap

Public Member Functions

 TaskOutput (int aThreadId, const Task &aTask, Simulation &aSimulation)
void OpenFiles ()
void CloseFiles ()
void Write (double aSimTime)
 Write the variables to the files that have requested variable output.
void WriteEvent (double aSimTime)
 Write the events to the files that have requested event output.
void WriteTaskSummary ()
 Write the summary to the files that have requested summary output.
EventsGetEvents ()
SummaryDataGetTaskSummary ()

Static Public Member Functions

static void WriteSummary ()
static void CloseAllFiles ()
static void ResetSummary (const InputConfig &aInputConfig)
static SummaryDataGetSummaryData (int aRunIndex, int aSiteIndex)
static void ReleaseRunSummary ()
static void InitializePkOutput (const InputConfig::RunList *aRunList, int aNumPkRuns)
 Pk Table Methods.
static void InsertPk (double aPk, const RunConfig &aRunConfig, int aTaskNum, int aTargetTaskNum)
static void FlushPk (const RunConfig &aRunConfig, int aRunIndex=cENTIRE_TABLE, int aAltitudeIndex=cENTIRE_TABLE)

Static Public Attributes

static const int cENTIRE_TABLE = -1
static const int cPADDING_WIDTH = 15
static const char cDELIMITER = ' '

Detailed Description

This class is the run-time output controller for the tasks.

Member Typedef Documentation

◆ OpenFileMap

typedef std::map<std::string, std::ostream*> engage::TaskOutput::OpenFileMap

Constructor & Destructor Documentation

◆ TaskOutput()

engage::TaskOutput::TaskOutput ( int aThreadId,
const Task & aTask,
Simulation & aSimulation )

Member Function Documentation

◆ CloseAllFiles()

void engage::TaskOutput::CloseAllFiles ( )
static

◆ CloseFiles()

void engage::TaskOutput::CloseFiles ( )

References CloseAllFiles().

◆ FlushPk()

void engage::TaskOutput::FlushPk ( const RunConfig & aRunConfig,
int aRunIndex = cENTIRE_TABLE,
int aAltitudeIndex = cENTIRE_TABLE )
static

Writes the Pk table hierarchy to disc using the passed output path. If values are provided for the optional run index and altitude index, this method will only write out the single associated Pk table. Otherwise, the entire table is output to disc NOTE: This method is naive, in that it doesn't check if a table is ready for writing out. Carelessness may lead to undefined behavior.

References cENTIRE_TABLE, FlushPk(), engage::RunConfig::GetPkLengthUnit(), engage::RunConfig::GetPkPath(), and engage::RunConfig::GetPkVelocityUnit().

Referenced by engage::TaskManager::Execute(), FlushPk(), and InsertPk().

◆ GetEvents()

Events & engage::TaskOutput::GetEvents ( )
inline

◆ GetSummaryData()

SummaryData & engage::TaskOutput::GetSummaryData ( int aRunIndex,
int aSiteIndex )
static

◆ GetTaskSummary()

SummaryData & engage::TaskOutput::GetTaskSummary ( )
inline

◆ InitializePkOutput()

void engage::TaskOutput::InitializePkOutput ( const InputConfig::RunList * aRunList,
int aNumPkRuns )
static

Pk Table Methods.

In the case of user requested output of Pk Table data, this method must be called prior to usage of the other Pk Table generation methods to initialize the static containers and set variables for defined behavior. The InputConfig::RunList is used to populate this data here. This method should not be called unless Pk data is required, as the time complexity of this method is prohibitive and could needlessly delay initialization unless required

References engage::TargetConfig::GetGridAltCount(), engage::TargetConfig::GetGridAltMin(), engage::TargetConfig::GetGridAltStep(), engage::SiteConfig::GetGridCrCount(), engage::SiteConfig::GetGridCrMin(), engage::SiteConfig::GetGridCrStep(), engage::SiteConfig::GetGridDrCount(), engage::SiteConfig::GetGridDrMin(), and engage::SiteConfig::GetGridDrStep().

Referenced by engage::TaskManager::Execute().

◆ InsertPk()

void engage::TaskOutput::InsertPk ( double aPk,
const RunConfig & aRunConfig,
int aTaskNum,
int aTargetTaskNum )
static

Public method for insertion of Pk Tables into the data container for storage and processing. Pk values are inserted based on data derived from the run configuration, and the current run and task number of the task handling the Pk generation (typically, via a thread). If periodic Pk table flushing is selected, this method will also check for the completion of the necessary data for a individual Pk table file, and write the file to disc. If periodic flushing is not selected, all Pk data will be flushed when all runs are completed.

References FlushPk(), engage::SiteConfig::GetGridCrCount(), engage::SiteConfig::GetGridDrCount(), engage::RunConfig::GetRepetitionCount(), engage::RunConfig::GetRunIndex(), engage::SiteConfig::GetRunPosition(), engage::TargetConfig::GetRunPosition(), engage::RunConfig::GetSiteConfig(), engage::RunConfig::GetTargetConfig(), and engage::RunConfig::IsPkPeriodicFlush().

Referenced by engage::Task::Execute().

◆ OpenFiles()

void engage::TaskOutput::OpenFiles ( )

◆ ReleaseRunSummary()

void engage::TaskOutput::ReleaseRunSummary ( )
static

◆ ResetSummary()

void engage::TaskOutput::ResetSummary ( const InputConfig & aInputConfig)
static

◆ Write()

void engage::TaskOutput::Write ( double aSimTime)

Write the variables to the files that have requested variable output.

References engage::OutputConfig::DoPeriodicOutput(), and engage::OutputConfig::GetOutputItems().

◆ WriteEvent()

void engage::TaskOutput::WriteEvent ( double aSimTime)

Write the events to the files that have requested event output.

References engage::OutputConfig::DoEventOutput(), and engage::OutputConfig::GetEventItems().

◆ WriteSummary()

◆ WriteTaskSummary()

void engage::TaskOutput::WriteTaskSummary ( )

Write the summary to the files that have requested summary output.

Member Data Documentation

◆ cDELIMITER

const char engage::TaskOutput::cDELIMITER = ' '
static

◆ cENTIRE_TABLE

const int engage::TaskOutput::cENTIRE_TABLE = -1
static

Referenced by FlushPk().

◆ cPADDING_WIDTH

const int engage::TaskOutput::cPADDING_WIDTH = 15
static

The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved