CMS 3D CMS Logo

h5_DataSet.h
Go to the documentation of this file.
1 #ifndef CondCore_CondHDF5ESSource_DataSet_h
2 #define CondCore_CondHDF5ESSource_DataSet_h
3 // -*- C++ -*-
4 //
5 // Package: CondCore/CondHDF5ESSource
6 // Class : DataSet
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Fri, 30 Jun 2023 14:37:25 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 #include <string>
24 #include <vector>
25 
26 #include "hdf5.h"
27 
28 // user include files
29 #include "IOVSyncValue.h"
30 
31 // forward declarations
32 
33 namespace cms::h5 {
34  class File;
35  class Group;
36  class Attribute;
37 
38  class DataSet {
39  public:
40  DataSet(hid_t iParentID, std::string const& iName);
41  DataSet(hid_t iParentID, const void* iRef);
42  ~DataSet();
43 
44  DataSet(const DataSet&) = delete; // stop default
45  DataSet& operator=(const DataSet&) = delete; // stop default
46  DataSet(DataSet&&) = delete; // stop default
47  DataSet& operator=(DataSet&&) = delete; // stop default
48 
49  // ---------- const member functions ---------------------
50  std::shared_ptr<Attribute> findAttribute(std::string const& iName) const;
51 
52  std::vector<hobj_ref_t> readRefs() const;
53  std::vector<char> readBytes() const;
54  std::vector<cond::hdf5::IOVSyncValue> readSyncValues() const;
55 
56  std::size_t storageSize() const;
57  std::size_t memorySize() const;
58  uint64_t fileOffset() const;
59  uint32_t layout() const;
60 
61  // ---------- static member functions --------------------
62 
63  // ---------- member functions ---------------------------
64 
65  private:
66  std::size_t size() const;
67 
68  // ---------- member data --------------------------------
69  hid_t id_;
70  };
71 
72 } // namespace cms::h5
73 #endif
std::vector< cond::hdf5::IOVSyncValue > readSyncValues() const
Definition: h5_DataSet.cc:144
uint32_t layout() const
Definition: h5_DataSet.cc:103
std::size_t memorySize() const
Definition: h5_DataSet.cc:100
uint64_t fileOffset() const
Definition: h5_DataSet.cc:101
std::shared_ptr< Attribute > findAttribute(std::string const &iName) const
Definition: h5_DataSet.cc:86
DataSet(hid_t iParentID, std::string const &iName)
Definition: h5_DataSet.cc:48
unsigned long long uint64_t
Definition: Time.h:13
std::vector< hobj_ref_t > readRefs() const
Definition: h5_DataSet.cc:110
std::vector< char > readBytes() const
Definition: h5_DataSet.cc:127
std::size_t size() const
Definition: h5_DataSet.cc:90
DataSet & operator=(const DataSet &)=delete
std::size_t storageSize() const
Definition: h5_DataSet.cc:99