23 #include "openPMD/IO/Access.hpp"
24 #include "openPMD/Series.hpp"
25 #include "openPMD/backend/Attributable.hpp"
44 template <
typename... T_Args,
typename T_SeriesAccessor>
46 add_pickle(pybind11::class_<T_Args...> &cl, T_SeriesAccessor &&seriesAccessor)
50 typename std::tuple_element<0, std::tuple<T_Args...> >::type;
54 [](
const PickledClass &a) {
61 [&seriesAccessor](py::tuple t) {
64 throw std::runtime_error(
"Invalid state!");
66 std::string
const filename = t[0].cast<std::string>();
67 std::vector<std::string>
const group =
68 t[1].cast<std::vector<std::string> >();
75 return seriesAccessor(series, group);
Implementation for the root level of the openPMD hierarchy.
Definition: Series.hpp:219
Public definitions of openPMD-api.
Definition: Date.cpp:29
@ READ_ONLY
Open Series as read-only, fails if Series is not found.
void add_pickle(pybind11::class_< T_Args... > &cl, T_SeriesAccessor &&seriesAccessor)
Helper to Pickle Attributable Classes.
Definition: Pickle.hpp:46
String serialization to describe an Attributable.
Definition: Attributable.hpp:225
std::string filePath() const
Reconstructs a path that can be passed to a Series constructor.
Definition: Attributable.cpp:196
std::vector< std::string > group
e.g., .bp, .h5, .json, ...
Definition: Attributable.hpp:237