mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Optional RW mode for Hdf5Reader
This commit is contained in:
@ -61,9 +61,9 @@ Group & Hdf5Writer::getGroup(void)
|
||||
}
|
||||
|
||||
// Reader implementation ///////////////////////////////////////////////////////
|
||||
Hdf5Reader::Hdf5Reader(const std::string &fileName)
|
||||
Hdf5Reader::Hdf5Reader(const std::string &fileName, const bool readOnly)
|
||||
: fileName_(fileName)
|
||||
, file_(fileName.c_str(), H5F_ACC_RDWR)
|
||||
, file_(fileName.c_str(), readOnly ? H5F_ACC_RDONLY : H5F_ACC_RDWR)
|
||||
{
|
||||
group_ = file_.openGroup("/");
|
||||
readSingleAttribute(dataSetThres_, HDF5_GRID_GUARD "dataset_threshold",
|
||||
|
@ -54,7 +54,7 @@ namespace Grid
|
||||
class Hdf5Reader: public Reader<Hdf5Reader>
|
||||
{
|
||||
public:
|
||||
Hdf5Reader(const std::string &fileName);
|
||||
Hdf5Reader(const std::string &fileName, const bool readOnly = true);
|
||||
virtual ~Hdf5Reader(void) = default;
|
||||
bool push(const std::string &s);
|
||||
void pop(void);
|
||||
|
Reference in New Issue
Block a user