CMS 3D CMS Logo

h5_Group.h
Go to the documentation of this file.
1 #ifndef CondCore_CondHDF5ESSource_h5_Group_h
2 #define CondCore_CondHDF5ESSource_h5_Group_h
3 // -*- C++ -*-
4 //
5 // Package: CondCore/CondHDF5ESSource
6 // Class : Group
7 //
16 //
17 // Original Author: Christopher Jones
18 // Created: Fri, 30 Jun 2023 14:37:18 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 #include <string>
24 
25 #include "hdf5.h"
26 
27 // user include files
28 
29 // forward declarations
30 
31 namespace cms::h5 {
32  class File;
33  class DataSet;
34  class Attribute;
35 
36  class Group {
37  public:
38  explicit Group(hid_t, std::string const&);
39  explicit Group(hid_t, const void* iRef);
40 
41  ~Group();
42 
43  Group(const Group&) = delete; // stop default
44  Group& operator=(const Group&) = delete; // stop default
45  Group(Group&&) = delete; // stop default
46  Group& operator=(Group&&) = delete; // stop default
47 
48  // ---------- const member functions ---------------------
49  std::shared_ptr<Group> findGroup(std::string const& iName) const;
50  std::shared_ptr<DataSet> findDataSet(std::string const& iName) const;
51  std::shared_ptr<Attribute> findAttribute(std::string const& iName) const;
52 
53  std::shared_ptr<Group> derefGroup(hobj_ref_t iRef) const;
54  std::shared_ptr<DataSet> derefDataSet(hobj_ref_t iRef) const;
55 
56  std::string name() const;
57 
58  std::size_t getNumObjs() const;
59  std::string getObjnameByIdx(std::size_t) const;
60  // ---------- static member functions --------------------
61 
62  // ---------- member functions ---------------------------
63 
64  private:
65  // ---------- member data --------------------------------
66 
67  hid_t id_;
68  };
69 } // namespace cms::h5
70 #endif
std::shared_ptr< Group > findGroup(std::string const &iName) const
Definition: h5_Group.cc:72
std::string getObjnameByIdx(std::size_t) const
Definition: h5_Group.cc:105
std::size_t getNumObjs() const
Definition: h5_Group.cc:97
Group(hid_t, std::string const &)
Definition: h5_Group.cc:34
std::shared_ptr< DataSet > findDataSet(std::string const &iName) const
Definition: h5_Group.cc:75
Group & operator=(const Group &)=delete
std::shared_ptr< Group > derefGroup(hobj_ref_t iRef) const
Definition: h5_Group.cc:83
std::string name() const
Definition: h5_Group.cc:87
std::shared_ptr< Attribute > findAttribute(std::string const &iName) const
Definition: h5_Group.cc:79
std::shared_ptr< DataSet > derefDataSet(hobj_ref_t iRef) const
Definition: h5_Group.cc:85