openPMD-api
|
Data members for Series. More...
#include <Series.hpp>
Public Types | |
using | IterationIndex_t = Iteration::IterationIndex_t |
using | IterationsContainer_t = Container< Iteration, IterationIndex_t > |
Public Types inherited from openPMD::internal::AttributableData | |
using | A_MAP = std::map< std::string, Attribute > |
Public Member Functions | |
SeriesData (SeriesData const &)=delete | |
SeriesData (SeriesData &&)=delete | |
SeriesData & | operator= (SeriesData const &)=delete |
SeriesData & | operator= (SeriesData &&)=delete |
void | close () |
Public Member Functions inherited from openPMD::internal::AttributableData | |
AttributableData (AttributableData const &)=delete | |
AttributableData (AttributableData &&)=delete | |
AttributableData & | operator= (AttributableData const &)=delete |
AttributableData & | operator= (AttributableData &&)=delete |
Public Attributes | |
IterationsContainer_t | iterations {} |
std::optional< WriteIterations > | m_writeIterations |
For each instance of Series, there is only one instance of WriteIterations, stored in this Option. More... | |
std::unique_ptr< SeriesIterator > | m_sharedStatefulIterator |
Series::readIterations() returns an iterator type that modifies the state of the Series (by proceeding through IO steps). More... | |
std::set< IterationIndex_t > | m_currentlyActiveIterations |
For writing: Remember which iterations have been written in the currently active output step. More... | |
std::optional< std::string > | m_overrideFilebasedFilename |
Needed if reading a single iteration of a file-based series. More... | |
std::string | m_name |
Name of the iteration without filename suffix. More... | |
std::string | m_filenamePrefix |
Filename leading up to the expansion pattern. More... | |
std::string | m_filenamePostfix |
Filename after the expansion pattern without filename extension. | |
std::string | m_filenameExtension |
Filename extension as specified by the user. More... | |
int | m_filenamePadding = -1 |
The padding in file-based iteration encoding. More... | |
IterationEncoding | m_iterationEncoding {} |
The iteration encoding used in this series. | |
Format | m_format |
Detected IO format (backend). | |
StepStatus | m_stepStatus = StepStatus::NoStep |
Whether a step is currently active for this iteration. More... | |
bool | m_parseLazily = false |
True if a user opts into lazy parsing. | |
bool | m_wroteAtLeastOneIOStep = false |
In variable-based encoding, all backends except ADIOS2 can only write one single iteration. More... | |
std::optional< ParsePreference > | m_parsePreference |
Remember the preference that the backend specified for parsing. More... | |
std::optional< std::function< AbstractIOHandler *(Series &)> > | m_deferred_initialization = std::nullopt |
Public Attributes inherited from openPMD::internal::AttributableData | |
Writable | m_writable |
The Writable associated with this Attributable. More... | |
Data members for Series.
Pinned at one memory location.
(Not movable or copyable)
Class is final since our std::shared_ptr<Data_t> pattern has the little disadvantage that child constructors overwrite the parent constructors. Since the SeriesData constructor does some initialization, making this class final avoids stumbling over this pitfall.
std::set<IterationIndex_t> openPMD::internal::SeriesData::m_currentlyActiveIterations |
For writing: Remember which iterations have been written in the currently active output step.
Use this later when writing the snapshot attribute.
std::string openPMD::internal::SeriesData::m_filenameExtension |
Filename extension as specified by the user.
(Not necessarily the backend's default suffix)
int openPMD::internal::SeriesData::m_filenamePadding = -1 |
The padding in file-based iteration encoding.
0 if no padding is given (T pattern). -1 if no expansion pattern has been parsed.
std::string openPMD::internal::SeriesData::m_filenamePrefix |
Filename leading up to the expansion pattern.
Only used for file-based iteration encoding.
std::string openPMD::internal::SeriesData::m_name |
Name of the iteration without filename suffix.
In case of file-based iteration encoding, with expansion pattern. E.g.: simData.bp -> simData simData_%06T.h5 -> simData_%06T
std::optional<std::string> openPMD::internal::SeriesData::m_overrideFilebasedFilename |
Needed if reading a single iteration of a file-based series.
Users may specify the concrete filename of one iteration instead of the file-based expansion pattern. In that case, the filename must not be constructed from prefix, infix and suffix as usual in file-based iteration encoding. Instead, the user-specified filename should be used directly. Store that filename in the following Option to indicate this situation.
std::optional<ParsePreference> openPMD::internal::SeriesData::m_parsePreference |
Remember the preference that the backend specified for parsing.
Not used in file-based iteration encoding, empty then. In linear read mode, parsing only starts after calling Series::readIterations(), empty before that point.
std::unique_ptr<SeriesIterator> openPMD::internal::SeriesData::m_sharedStatefulIterator |
Series::readIterations() returns an iterator type that modifies the state of the Series (by proceeding through IO steps).
Hence, we need to make sure that there is only one of them, otherwise they will both make modifications to the Series that the other iterator is not aware of.
Plan: At some point, we should add a second iterator type that does not change the state. Series::readIterations() should then return either this or that iterator depending on read mode (linear or random-access) and backend capabilities.
Due to include order, this member needs to be a pointer instead of an optional.
StepStatus openPMD::internal::SeriesData::m_stepStatus = StepStatus::NoStep |
Whether a step is currently active for this iteration.
Used for group-based iteration layout, see SeriesData.hpp for iteration-based layout. Access via stepStatus() method to automatically select the correct one among both flags.
std::optional<WriteIterations> openPMD::internal::SeriesData::m_writeIterations |
For each instance of Series, there is only one instance of WriteIterations, stored in this Option.
This ensures that Series::writeIteration() always returns the same instance.
bool openPMD::internal::SeriesData::m_wroteAtLeastOneIOStep = false |
In variable-based encoding, all backends except ADIOS2 can only write one single iteration.
So, we remember if we already had a step, and if yes, Parameter<Operation::ADVANCE>::isThisStepMandatory is set as true in variable-based encoding. The backend will then throw if it has no support for steps.