openPMD-api
Classes | Public Member Functions | Protected Member Functions | Friends | List of all members
openPMD::SeriesInterface Class Reference

Implementation for the root level of the openPMD hierarchy. More...

#include <Series.hpp>

Inheritance diagram for openPMD::SeriesInterface:
Inheritance graph
[legend]
Collaboration diagram for openPMD::SeriesInterface:
Collaboration graph
[legend]

Classes

struct  ParsedInput
 

Public Member Functions

std::string openPMD () const
 
SeriesInterfacesetOpenPMD (std::string const &openPMD)
 Set the version of the enforced openPMD standard. More...
 
uint32_t openPMDextension () const
 
SeriesInterfacesetOpenPMDextension (uint32_t openPMDextension)
 Set a 32-bit mask of applied extensions to the openPMD standard. More...
 
std::string basePath () const
 
SeriesInterfacesetBasePath (std::string const &basePath)
 Set the common prefix for all data sets and sub-groups of a specific iteration. More...
 
std::string meshesPath () const
 
SeriesInterfacesetMeshesPath (std::string const &meshesPath)
 Set the path to mesh records, relative(!) to basePath. More...
 
std::string particlesPath () const
 
SeriesInterfacesetParticlesPath (std::string const &particlesPath)
 Set the path to groups for each particle species, relative(!) to basePath. More...
 
std::string author () const
 
SeriesInterfacesetAuthor (std::string const &author)
 Indicate the author and contact for the information in the file. More...
 
std::string software () const
 
SeriesInterfacesetSoftware (std::string const &newName, std::string const &newVersion=std::string("unspecified"))
 Indicate the software/code/simulation that created the file. More...
 
std::string softwareVersion () const
 
SeriesInterfacesetSoftwareVersion (std::string const &softwareVersion)
 Indicate the version of the software/code/simulation that created the file. More...
 
std::string date () const
 
SeriesInterfacesetDate (std::string const &date)
 Indicate the date of creation. More...
 
std::string softwareDependencies () const
 
SeriesInterfacesetSoftwareDependencies (std::string const &newSoftwareDependencies)
 Indicate dependencies of software that were used to create the file. More...
 
std::string machine () const
 
SeriesInterfacesetMachine (std::string const &newMachine)
 Indicate the machine or relevant hardware that created the file. More...
 
IterationEncoding iterationEncoding () const
 
SeriesInterfacesetIterationEncoding (IterationEncoding iterationEncoding)
 Set the encoding style for multiple iterations in this series. More...
 
std::string iterationFormat () const
 
SeriesInterfacesetIterationFormat (std::string const &iterationFormat)
 Set a pattern describing how to access single iterations in the raw file. More...
 
std::string name () const
 
SeriesInterfacesetName (std::string const &name)
 Set the pattern for file names. More...
 
std::string backend () const
 The currently used backend. More...
 
void flush ()
 Execute all required remaining IO operations to write or read data.
 
- Public Member Functions inherited from openPMD::AttributableInterface
Attribute getAttribute (std::string const &key) const
 Retrieve value of Attribute stored with provided key. More...
 
bool deleteAttribute (std::string const &key)
 Remove Attribute of provided value both logically and physically. More...
 
std::vector< std::string > attributes () const
 List all currently stored Attributes' keys. More...
 
size_t numAttributes () const
 Count all currently stored Attributes. More...
 
bool containsAttribute (std::string const &key) const
 Check whether am Attribute with a given key exists. More...
 
std::string comment () const
 Retrieve a user-supplied comment associated with the object. More...
 
AttributableInterfacesetComment (std::string const &comment)
 Populate Attribute corresponding to a comment with the user-supplied comment. More...
 
void seriesFlush ()
 Flush the corresponding Series object. More...
 
MyPath myPath () const
 The path to this object within its containing Series. More...
 
template<typename T >
bool setAttribute (std::string const &key, T value)
 Populate Attribute of provided name with provided value. More...
 
bool setAttribute (std::string const &key, char const value[])
 

Protected Member Functions

 SeriesInterface (internal::SeriesData *, internal::AttributableData *)
 
- Protected Member Functions inherited from openPMD::AttributableInterface
 AttributableInterface (internal::AttributableData *)
 
template<typename T >
 AttributableInterface (T *attri)
 
internal::SeriesInternal const & retrieveSeries () const
 
internal::SeriesInternalretrieveSeries ()
 
void seriesFlush (FlushLevel)
 
void flushAttributes ()
 
void readAttributes (ReadMode)
 
template<typename T >
T readFloatingpoint (std::string const &key) const
 Retrieve the value of a floating point Attribute of user-defined precision with ensured type-safety. More...
 
template<typename T >
std::vector< TreadVectorFloatingpoint (std::string const &key) const
 Retrieve a vector of values of a floating point Attributes of user-defined precision with ensured type-safety. More...
 
AbstractIOHandlerIOHandler ()
 
AbstractIOHandler const * IOHandler () const
 
Writable *& parent ()
 
Writable const * parent () const
 
Writablewritable ()
 
Writable const & writable () const
 
internal::AttributableDataget ()
 
internal::AttributableData const & get () const
 
bool dirty () const
 
bool & dirty ()
 
bool written () const
 
bool & written ()
 
Iteration const & containingIteration () const
 Returns the corresponding Iteration. More...
 
IterationcontainingIteration ()
 

Friends

class AttributableInterface
 
class Iteration
 
class Writable
 
class SeriesIterator
 
class internal::SeriesInternal
 
class Series
 
class WriteIterations
 

Additional Inherited Members

- Protected Types inherited from openPMD::AttributableInterface
enum  ReadMode { IgnoreExisting, OverrideExisting, FullyReread }
 
- Protected Attributes inherited from openPMD::AttributableInterface
internal::AttributableDatam_attri = nullptr
 

Detailed Description

Implementation for the root level of the openPMD hierarchy.

Entry point and common link between all iterations of particle and mesh data.

See also
https://github.com/openPMD/openPMD-standard/blob/latest/STANDARD.md#hierarchy-of-the-data-file
https://github.com/openPMD/openPMD-standard/blob/latest/STANDARD.md#iterations-and-time-series

Member Function Documentation

◆ author()

std::string openPMD::SeriesInterface::author ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating author and contact for the information in the file.

◆ backend()

std::string openPMD::SeriesInterface::backend ( ) const

The currently used backend.

See also
AbstractIOHandler::backendName()
Returns
String of a pattern for data backend.

◆ basePath()

std::string openPMD::SeriesInterface::basePath ( ) const
Returns
String representing the common prefix for all data sets and sub-groups of a specific iteration.

◆ date()

std::string openPMD::SeriesInterface::date ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating date of creation.

◆ iterationEncoding()

IterationEncoding openPMD::SeriesInterface::iterationEncoding ( ) const
Returns
Current encoding style for multiple iterations in this series.

◆ iterationFormat()

std::string openPMD::SeriesInterface::iterationFormat ( ) const
Returns
String describing a pattern describing how to access single iterations in the raw file.

◆ machine()

std::string openPMD::SeriesInterface::machine ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating the machine or relevant hardware that created the file.

◆ meshesPath()

std::string openPMD::SeriesInterface::meshesPath ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String representing the path to mesh records, relative(!) to basePath.

◆ name()

std::string openPMD::SeriesInterface::name ( ) const
Returns
String of a pattern for file names.

◆ openPMD()

std::string openPMD::SeriesInterface::openPMD ( ) const
Returns
String representing the current enforced version of the openPMD standard.

◆ openPMDextension()

uint32_t openPMD::SeriesInterface::openPMDextension ( ) const
Returns
32-bit mask of applied extensions to the openPMD standard.

◆ particlesPath()

std::string openPMD::SeriesInterface::particlesPath ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String representing the path to particle species, relative(!) to basePath.

◆ setAuthor()

SeriesInterface & openPMD::SeriesInterface::setAuthor ( std::string const &  author)

Indicate the author and contact for the information in the file.

Parameters
authorString indicating author and contact for the information in the file.
Returns
Reference to modified series.

◆ setBasePath()

SeriesInterface & openPMD::SeriesInterface::setBasePath ( std::string const &  basePath)

Set the common prefix for all data sets and sub-groups of a specific iteration.

Parameters
basePathString of the common prefix for all data sets and sub-groups of a specific iteration.
Returns
Reference to modified series.

◆ setDate()

SeriesInterface & openPMD::SeriesInterface::setDate ( std::string const &  date)

Indicate the date of creation.

Parameters
dateString indicating the date of creation.
Returns
Reference to modified series.

◆ setIterationEncoding()

SeriesInterface & openPMD::SeriesInterface::setIterationEncoding ( IterationEncoding  iterationEncoding)

Set the encoding style for multiple iterations in this series.

A preview on the openPMD 2.0 variable-based iteration encoding can be activated with this call. Making full use of the variable-based iteration encoding requires (1) explicit support by the backend (available only in ADIOS2) and (2) use of the openPMD streaming API. In other backends and without the streaming API, only one iteration/snapshot may be written in the variable-based encoding, making this encoding a good choice for single-snapshot data dumps.

Parameters
iterationEncodingDesired encoding style for multiple iterations in this series.
Returns
Reference to modified series.

◆ setIterationFormat()

SeriesInterface & openPMD::SeriesInterface::setIterationFormat ( std::string const &  iterationFormat)

Set a pattern describing how to access single iterations in the raw file.

Parameters
iterationFormatString with the iteration regex %T defining either the series of files (fileBased) or the series of groups within a single file (groupBased) that allows to extract the iteration from it. For fileBased formats the iteration must be included in the file name. The format depends on the selected iterationEncoding method.
Returns
Reference to modified series.

◆ setMachine()

SeriesInterface & openPMD::SeriesInterface::setMachine ( std::string const &  newMachine)

Indicate the machine or relevant hardware that created the file.

Parameters
newMachineString indicating the machine or relevant hardware that created the file (semicolon-separated list if needed)..
Returns
Reference to modified series.

◆ setMeshesPath()

SeriesInterface & openPMD::SeriesInterface::setMeshesPath ( std::string const &  meshesPath)

Set the path to mesh records, relative(!) to basePath.

Parameters
meshesPathString of the path to mesh records, relative(!) to basePath.
Returns
Reference to modified series.

◆ setName()

SeriesInterface & openPMD::SeriesInterface::setName ( std::string const &  name)

Set the pattern for file names.

Parameters
nameString of the pattern for file names. Must include iteration regex %T for fileBased data.
Returns
Reference to modified series.

◆ setOpenPMD()

SeriesInterface & openPMD::SeriesInterface::setOpenPMD ( std::string const &  openPMD)

Set the version of the enforced openPMD standard.

Parameters
openPMDString MAJOR.MINOR.REVISION of the desired version of the openPMD standard.
Returns
Reference to modified series.

◆ setOpenPMDextension()

SeriesInterface & openPMD::SeriesInterface::setOpenPMDextension ( uint32_t  openPMDextension)

Set a 32-bit mask of applied extensions to the openPMD standard.

Parameters
openPMDextensionUnsigned 32-bit integer used as a bit-mask of applied extensions.
Returns
Reference to modified series.

◆ setParticlesPath()

SeriesInterface & openPMD::SeriesInterface::setParticlesPath ( std::string const &  particlesPath)

Set the path to groups for each particle species, relative(!) to basePath.

Parameters
particlesPathString of the path to groups for each particle species, relative(!) to basePath.
Returns
Reference to modified series.

◆ setSoftware()

SeriesInterface & openPMD::SeriesInterface::setSoftware ( std::string const &  newName,
std::string const &  newVersion = std::string("unspecified") 
)

Indicate the software/code/simulation that created the file.

Parameters
newNameString indicating the software/code/simulation that created the file.
newVersionString indicating the version of the software/code/simulation that created the file.
Returns
Reference to modified series.

◆ setSoftwareDependencies()

SeriesInterface & openPMD::SeriesInterface::setSoftwareDependencies ( std::string const &  newSoftwareDependencies)

Indicate dependencies of software that were used to create the file.

Parameters
newSoftwareDependenciesString indicating dependencies of software that were used to create the file (semicolon-separated list if needed).
Returns
Reference to modified series.

◆ setSoftwareVersion()

SeriesInterface & openPMD::SeriesInterface::setSoftwareVersion ( std::string const &  softwareVersion)

Indicate the version of the software/code/simulation that created the file.

Deprecated:
Set the version with the second argument of setSoftware()
Parameters
softwareVersionString indicating the version of the software/code/simulation that created the file.
Returns
Reference to modified series.

◆ software()

std::string openPMD::SeriesInterface::software ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating the software/code/simulation that created the file;

◆ softwareDependencies()

std::string openPMD::SeriesInterface::softwareDependencies ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating dependencies of software that were used to create the file.

◆ softwareVersion()

std::string openPMD::SeriesInterface::softwareVersion ( ) const
Exceptions
no_such_attribute_errorIf optional attribute is not present.
Returns
String indicating the version of the software/code/simulation that created the file.

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