|
WSF
|
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. | |
| Events & | GetEvents () |
| SummaryData & | GetTaskSummary () |
Static Public Member Functions | |
| static void | WriteSummary () |
| static void | CloseAllFiles () |
| static void | ResetSummary (const InputConfig &aInputConfig) |
| static SummaryData & | GetSummaryData (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 = ' ' |
This class is the run-time output controller for the tasks.
| typedef std::map<std::string, std::ostream*> engage::TaskOutput::OpenFileMap |
| engage::TaskOutput::TaskOutput | ( | int | aThreadId, |
| const Task & | aTask, | ||
| Simulation & | aSimulation ) |
|
static |
References CloseAllFiles().
Referenced by CloseAllFiles(), CloseFiles(), and engage::TaskManager::Execute().
| void engage::TaskOutput::CloseFiles | ( | ) |
References CloseAllFiles().
|
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().
|
inline |
|
static |
Referenced by engage::SimulationExtension::WeaponTerminated().
|
inline |
|
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().
|
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().
| void engage::TaskOutput::OpenFiles | ( | ) |
|
static |
Referenced by engage::SimulationExtension::WeaponTerminated().
|
static |
References engage::SiteConfig::GetPointCount(), and engage::InputConfig::GetRunList().
Referenced by engage::TaskManager::Execute().
| 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().
| 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().
|
static |
| void engage::TaskOutput::WriteTaskSummary | ( | ) |
Write the summary to the files that have requested summary output.
|
static |
|
static |
Referenced by FlushPk().
|
static |