#include <h5_DataSet.h>
|
std::size_t | size () const |
|
Definition at line 38 of file h5_DataSet.h.
◆ DataSet() [1/4]
DataSet::DataSet |
( |
hid_t |
iParentID, |
|
|
std::string const & |
iName |
|
) |
| |
◆ DataSet() [2/4]
DataSet::DataSet |
( |
hid_t |
iParentID, |
|
|
const void * |
iRef |
|
) |
| |
Definition at line 54 of file h5_DataSet.cc.
References Exception, and id_.
54 :
id_(H5Rdereference2(iParentID, H5P_DEFAULT, H5R_OBJECT, iRef)) {
56 throw cms::Exception(
"BadH5DataSetRef") <<
"unable to derenfence dataset from parent " << iParentID;
◆ ~DataSet()
◆ DataSet() [3/4]
cms::h5::DataSet::DataSet |
( |
const DataSet & |
| ) |
|
|
delete |
◆ DataSet() [4/4]
cms::h5::DataSet::DataSet |
( |
DataSet && |
| ) |
|
|
delete |
◆ fileOffset()
uint64_t DataSet::fileOffset |
( |
| ) |
const |
◆ findAttribute()
std::shared_ptr< Attribute > DataSet::findAttribute |
( |
std::string const & |
iName | ) |
const |
Definition at line 86 of file h5_DataSet.cc.
References id_.
87 return std::make_shared<Attribute>(
id_, iName);
◆ layout()
uint32_t DataSet::layout |
( |
| ) |
const |
◆ memorySize()
std::size_t DataSet::memorySize |
( |
| ) |
const |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ readBytes()
std::vector< char > DataSet::readBytes |
( |
| ) |
const |
Definition at line 127 of file h5_DataSet.cc.
References Exception, id_, and size().
128 Type type_id{H5Dget_type(
id_)};
129 auto class_type = H5Tget_class(type_id.id_);
130 if (class_type != H5T_INTEGER) {
131 throw cms::Exception(
"BadDataSetType") <<
"asked to read dataset as a byte, but it is a " << class_type;
134 std::vector<char> bytes;
135 bytes.resize(
size());
137 auto ret_value = H5Dread(
id_, H5T_STD_I8LE, H5S_ALL, H5S_ALL, H5P_DEFAULT, bytes.data());
◆ readRefs()
std::vector< hobj_ref_t > DataSet::readRefs |
( |
| ) |
const |
Definition at line 110 of file h5_DataSet.cc.
References Exception, id_, and size().
111 Type type_id{H5Dget_type(
id_)};
112 auto class_type = H5Tget_class(type_id.id_);
113 if (class_type != H5T_REFERENCE) {
114 throw cms::Exception(
"BadDataSetType") <<
"asked to read dataset as a ref, but it is a " << class_type;
117 std::vector<hobj_ref_t> refs;
120 auto ret_value = H5Dread(
id_, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, refs.data());
◆ readSyncValues()
Definition at line 144 of file h5_DataSet.cc.
References Exception, id_, and size().
150 const Type type_id{H5Dget_type(
id_)};
151 if (not H5Tequal(sv_type_id.id_, type_id.id_)) {
153 <<
"asked to read dataset as a IOVSyncValue, but it is a " << type_id.id_;
157 std::vector<cond::hdf5::IOVSyncValue> syncValues;
158 syncValues.resize(
size());
160 auto ret_value = H5Dread(
id_, sv_type_id.id_, H5S_ALL, H5S_ALL, H5P_DEFAULT, syncValues.data());
162 throw cms::Exception(
"BadH5Read") <<
"unable to read IOVSyncValue dataset " <<
id_;
◆ size()
std::size_t DataSet::size |
( |
void |
| ) |
const |
|
private |
◆ storageSize()
std::size_t DataSet::storageSize |
( |
| ) |
const |
◆ id_
hid_t cms::h5::DataSet::id_ |
|
private |