AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::sina::Run Class Reference

A sub-type of Record representing a single run of an applicaiton. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/Run.hpp>

Inheritance diagram for axom::sina::Run:

Public Types

using FileSet = std::unordered_set< File, FileHashByURI, FileEqualByURI >
 
using DatumMap = std::unordered_map< std::string, Datum >
 
using CurveSetMap = std::unordered_map< std::string, CurveSet >
 
using LibraryDataMap = std::unordered_map< std::string, std::shared_ptr< DataHolder > >
 

Public Member Functions

 Run (ID id, std::string application, std::string version="", std::string user="")
 Create a new Run. More...
 
 Run (conduit::Node const &asNode)
 Create a Run from its representation as a conduit Node. More...
 
std::string const & getApplication () const
 Get the application that was run. More...
 
std::string const & getVersion () const
 Get the version of the application that was run. More...
 
std::string const & getUser () const
 Get the name of the user who ran the application. More...
 
conduit::Node toNode (CurveSet::CurveOrder curveOrder) const override
 Convert this record to its conduit Node representation. More...
 
conduit::Node toNode () const
 
void setDefaultCurveOrder (CurveSet::CurveOrder order)
 Set the default curve order for all Records. More...
 
CurveSet::CurveOrder getDefaultCurveOrder () const
 Get the effective default curve order for this Record. More...
 
ID const & getId () const noexcept
 Get the Record's ID. More...
 
std::string const & getType () const noexcept
 Get the Record's type. More...
 
void remove (File const &file)
 Remove a File from this record. More...
 
void add (File file)
 Add a File to this record. More...
 
void add (std::string name, Datum datum)
 Add a Datum to this DataHolder. More...
 
void add (CurveSet curveSet)
 Add a CurveSet to this DataHolder. More...
 
void add (std::string name, Datum datum)
 Add a Datum to this DataHolder. More...
 
void add (CurveSet curveSet)
 Add a CurveSet to this DataHolder. More...
 
FileSet const & getFiles () const noexcept
 Get the files associated with this record. More...
 
void addRecordAsLibraryData (Record const &childRecord, std::string const &name)
 Add another record to this one as library data. More...
 
DatumMap const & getData () const noexcept
 Get the DataHolder's data. More...
 
CurveSetMap const & getCurveSets () const noexcept
 Get the curve sets associated with this DataHolder. More...
 
std::shared_ptr< DataHolderaddLibraryData (std::string const &name)
 Add a new library to this DataHolder. More...
 
std::shared_ptr< DataHolderaddLibraryData (std::string const &name, conduit::Node existingLibraryData)
 Add a new library to this DataHolder with existing library data. More...
 
LibraryDataMap const & getLibraryData () const noexcept
 Get all library data associated with this DataHolder. More...
 
std::shared_ptr< DataHoldergetLibraryData (std::string const &libraryName)
 Get a specific library associated with this DataHolder. More...
 
std::shared_ptr< DataHolder > const getLibraryData (std::string const &libraryName) const
 Get a specific library associated with this DataHolder. More...
 
conduit::Node const & getUserDefinedContent () const noexcept
 Get the user-defined content of the object. More...
 
conduit::Node & getUserDefinedContent () noexcept
 Get the user-defined content of the object. More...
 
void setUserDefinedContent (conduit::Node userDefined)
 Set the user-defined content of the object. More...
 

Static Public Attributes

static CurveSet::CurveOrder defaultCurveOrder
 

Detailed Description

A sub-type of Record representing a single run of an applicaiton.

A Run is a subtype of Record corresponding to a single run of an application, as specified in the Sina schema. A Run has a few additional fields required in addition to the id required by a Record (type is automatically set to "run"):

  • application: the application/code used to create the Run
  • version: the version of the application used to create the Run
  • user: the username of the person who ran the application that generated this Run

To create a Run:

std::unique_ptr<axom::sina::Record> run1{new axom::sina::Run{run1ID, "My Sim Code", "1.2.3", "jdoe"}};
The ID of a Record.
Definition: ID.hpp:50
A sub-type of Record representing a single run of an applicaiton.
Definition: Run.hpp:48

Member Typedef Documentation

◆ FileSet

using axom::sina::Record::FileSet = std::unordered_set<File, FileHashByURI, FileEqualByURI>
inherited

An unordered set of File objects.

◆ DatumMap

using axom::sina::DataHolder::DatumMap = std::unordered_map<std::string, Datum>
inherited

An unordered map of Datum objects.

◆ CurveSetMap

using axom::sina::DataHolder::CurveSetMap = std::unordered_map<std::string, CurveSet>
inherited

An unordered map of CurveSet objects.

◆ LibraryDataMap

using axom::sina::DataHolder::LibraryDataMap = std::unordered_map<std::string, std::shared_ptr<DataHolder> >
inherited

An unordered map of shared pointers to DataHolder objects.

Constructor & Destructor Documentation

◆ Run() [1/2]

axom::sina::Run::Run ( ID  id,
std::string  application,
std::string  version = "",
std::string  user = "" 
)

Create a new Run.

Parameters
idthe run's ID
applicationthe application that was run
version(optional) the version of the application
user(optional) the user who executed the run

◆ Run() [2/2]

axom::sina::Run::Run ( conduit::Node const &  asNode)
explicit

Create a Run from its representation as a conduit Node.

Parameters
asNodethe run as a Node

Member Function Documentation

◆ getApplication()

std::string const& axom::sina::Run::getApplication ( ) const
inline

Get the application that was run.

Returns
the application's name

◆ getVersion()

std::string const& axom::sina::Run::getVersion ( ) const
inline

Get the version of the application that was run.

Returns
the application's version

◆ getUser()

std::string const& axom::sina::Run::getUser ( ) const
inline

Get the name of the user who ran the application.

Returns
the user's name

◆ toNode() [1/2]

conduit::Node axom::sina::Run::toNode ( CurveSet::CurveOrder  curveOrder) const
overridevirtual

Convert this record to its conduit Node representation.

Parameters
curveOrderOptionally, specify an order that CurveSets should be written in. Options are enumerated in CurveSets; REGISTRATION_OLDEST_FIRST is "ULTRA style".
Returns
the Node representation of this record.

Reimplemented from axom::sina::Record.

◆ toNode() [2/2]

conduit::Node axom::sina::Run::toNode ( ) const

◆ setDefaultCurveOrder()

void axom::sina::Record::setDefaultCurveOrder ( CurveSet::CurveOrder  order)
inherited

Set the default curve order for all Records.

Parameters
orderthe new default curve order

◆ getDefaultCurveOrder()

CurveSet::CurveOrder axom::sina::Record::getDefaultCurveOrder ( ) const
inherited

Get the effective default curve order for this Record.

Returns
the instance default if set, otherwise the global default

◆ getId()

ID const& axom::sina::Record::getId ( ) const
inlinenoexceptinherited

Get the Record's ID.

Returns
the ID

◆ getType()

std::string const& axom::sina::Record::getType ( ) const
inlinenoexceptinherited

Get the Record's type.

Returns
the Record's type

◆ remove()

void axom::sina::Record::remove ( File const &  file)
inherited

Remove a File from this record.

Parameters
filethe File to remove

◆ add() [1/5]

void axom::sina::Record::add ( File  file)
inherited

Add a File to this record.

Parameters
filethe File to add

◆ add() [2/5]

void axom::sina::DataHolder::add
inherited

Add a Datum to this DataHolder.

Parameters
namethe key for the Datum to add
datumthe Datum to add

◆ add() [3/5]

void axom::sina::DataHolder::add
inherited

Add a CurveSet to this DataHolder.

Parameters
curveSetthe CurveSet to add

◆ add() [4/5]

void axom::sina::DataHolder::add ( std::string  name,
Datum  datum 
)
inherited

Add a Datum to this DataHolder.

Parameters
namethe key for the Datum to add
datumthe Datum to add

◆ add() [5/5]

void axom::sina::DataHolder::add ( CurveSet  curveSet)
inherited

Add a CurveSet to this DataHolder.

Parameters
curveSetthe CurveSet to add

◆ getFiles()

FileSet const& axom::sina::Record::getFiles ( ) const
inlinenoexceptinherited

Get the files associated with this record.

Returns
the record's files

◆ addRecordAsLibraryData()

void axom::sina::Record::addRecordAsLibraryData ( Record const &  childRecord,
std::string const &  name 
)
inherited

Add another record to this one as library data.

Useful for libraries that can run in standalone mode; the host simply calls this method on the record the library produces. Merges file lists.

Parameters
nameThe host code's name for the library

◆ getData()

DatumMap const& axom::sina::DataHolder::getData ( ) const
inlinenoexceptinherited

Get the DataHolder's data.

Returns
the DataHolder's data

◆ getCurveSets()

CurveSetMap const& axom::sina::DataHolder::getCurveSets ( ) const
inlinenoexceptinherited

Get the curve sets associated with this DataHolder.

Returns
the dataholder's curve sets

◆ addLibraryData() [1/2]

std::shared_ptr<DataHolder> axom::sina::DataHolder::addLibraryData ( std::string const &  name)
inherited

Add a new library to this DataHolder.

If you try to add a library with a name that already exists, the old library will be replaced.

Returns
a pointer to a new DataHolder for a library of the given name.

◆ addLibraryData() [2/2]

std::shared_ptr<DataHolder> axom::sina::DataHolder::addLibraryData ( std::string const &  name,
conduit::Node  existingLibraryData 
)
inherited

Add a new library to this DataHolder with existing library data.

Returns
a pointer to a new DataHolder for a library of the given name.

◆ getLibraryData() [1/3]

LibraryDataMap const& axom::sina::DataHolder::getLibraryData ( ) const
inlinenoexceptinherited

Get all library data associated with this DataHolder.

Returns
the dataholder's library data

◆ getLibraryData() [2/3]

std::shared_ptr<DataHolder> axom::sina::DataHolder::getLibraryData ( std::string const &  libraryName)
inlineinherited

Get a specific library associated with this DataHolder.

Returns
the dataholder's library data

◆ getLibraryData() [3/3]

std::shared_ptr<DataHolder> const axom::sina::DataHolder::getLibraryData ( std::string const &  libraryName) const
inlineinherited

Get a specific library associated with this DataHolder.

Returns
the dataholder's library data

◆ getUserDefinedContent() [1/2]

conduit::Node const& axom::sina::DataHolder::getUserDefinedContent ( ) const
inlinenoexceptinherited

Get the user-defined content of the object.

Returns
the user-defined content

◆ getUserDefinedContent() [2/2]

conduit::Node& axom::sina::DataHolder::getUserDefinedContent ( )
inlinenoexceptinherited

Get the user-defined content of the object.

Returns
the user-defined content

◆ setUserDefinedContent()

void axom::sina::DataHolder::setUserDefinedContent ( conduit::Node  userDefined)
inherited

Set the user-defined content of the object.

Parameters
userDefinedthe user-defined content. Must be an object (key/value pairs)

Member Data Documentation

◆ defaultCurveOrder

CurveSet::CurveOrder axom::sina::Record::defaultCurveOrder
staticinherited

An enum member representing the default ordering of Curves within CurveSets.


The documentation for this class was generated from the following file: