openPMD-api
Public Member Functions | Public Attributes | List of all members
openPMD::Series Class Reference

Root level of the openPMD hierarchy. More...

#include <Series.hpp>

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

Public Member Functions

 Series (std::string const &filepath, Access at, MPI_Comm comm, std::string const &options="{}")
 
 Series (std::string const &filepath, Access at, std::string const &options="{}")
 Construct a new Series. More...
 
 operator bool () const
 Is this a usable Series object? More...
 
ReadIterations readIterations ()
 Entry point to the reading end of the streaming API. More...
 
WriteIterations writeIterations ()
 Entry point to the writing end of the streaming API. More...
 
- Public Member Functions inherited from openPMD::SeriesInterface
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[])
 

Public Attributes

Container< Iteration, uint64_t > iterations
 

Additional Inherited Members

- Protected Types inherited from openPMD::AttributableInterface
enum  ReadMode { IgnoreExisting, OverrideExisting, FullyReread }
 
- Protected Member Functions inherited from openPMD::SeriesInterface
 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 ()
 
- Protected Attributes inherited from openPMD::AttributableInterface
internal::AttributableDatam_attri = nullptr
 

Detailed Description

Root level of the openPMD hierarchy.

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

An instance can be created either directly via the given constructors or via the SeriesBuilder class.

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

Constructor & Destructor Documentation

◆ Series()

openPMD::Series::Series ( std::string const &  filepath,
Access  at,
std::string const &  options = "{}" 
)

Construct a new Series.

Parameters
filepathThe backend will be determined by the filepath extension.
atAccess mode.
optionsAdvanced backend configuration via JSON. May be specified as a JSON-formatted string directly, or as a path to a JSON textfile, prepended by an at sign '@'.

Member Function Documentation

◆ operator bool()

openPMD::Series::operator bool ( ) const

Is this a usable Series object?

Returns
true If a Series has been opened for reading and/or writing.
false If the object has been default-constructed.

◆ readIterations()

ReadIterations openPMD::Series::readIterations ( )

Entry point to the reading end of the streaming API.

Creates and returns an instance of the ReadIterations class which can be used for iterating over the openPMD iterations in a C++11-style for loop. Look for the ReadIterations class for further documentation.

Returns
ReadIterations

◆ writeIterations()

WriteIterations openPMD::Series::writeIterations ( )

Entry point to the writing end of the streaming API.

Creates and returns an instance of the WriteIterations class which is a restricted container of iterations which takes care of streaming semantics. The created object is stored as member of the Series object, hence this method may be called as many times as a user wishes. Look for the WriteIterations class for further documentation.

Returns
WriteIterations

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