7#ifndef CALLBACK_UTILS_META_HPP
8#define CALLBACK_UTILS_META_HPP
24 template<
typename AFields, u
int8_t PartType>
28 void read_grp_meta (
size_t chunk_idx, std::shared_ptr<H5::H5File> fptr,
29 size_t &Ngroups)
const override final
31 auto header = fptr->openGroup(
"/Header");
32 Ngroups = hdf5Utils::read_scalar_attr<int32_t,size_t>(header,
"Ngroups_ThisFile");
36 void read_prt_meta (
size_t chunk_idx, std::shared_ptr<H5::H5File> fptr,
37 coord_t &Bsize,
size_t &Npart)
const override final
39 auto header = fptr->openGroup(
"/Header");
40 Bsize = hdf5Utils::read_scalar_attr<double,coord_t>(header,
"BoxSize");
41 Npart = hdf5Utils::read_vector_attr<int32_t,size_t>(header,
"NumPart_ThisFile", PartType);
53 template<
typename AFields, u
int8_t PartType>
57 void read_grp_meta (
size_t chunk_idx, std::shared_ptr<H5::H5File> fptr,
58 size_t &Ngroups)
const override final
60 auto header = fptr->openGroup(
"/Header");
61 Ngroups = hdf5Utils::read_scalar_attr<int32_t,size_t>(header,
"Ngroups_ThisFile");
65 void read_prt_meta (
size_t chunk_idx, std::shared_ptr<H5::H5File> fptr,
66 coord_t &Bsize,
size_t &Npart)
const override final
68 auto header = fptr->openGroup(
"/Header");
69 Bsize = hdf5Utils::read_scalar_attr<double,coord_t>(header,
"BoxSize");
70 Npart = hdf5Utils::read_vector_attr<uint32_t,size_t>(header,
"NumPart_ThisFile", PartType);
79 template<
typename AFields>
Contains the abstract base class that the user should subclass from in order to define the desired fu...
float coord_t
Internal coordinate type.
Definition fields.hpp:28
some utility functions to read attributes from hdf5 files
contains classes that implement parts of the Callback base.
Definition callback_utils.hpp:35
The abstract base class the user should inherit from.
Definition callback.hpp:32