Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:01:30

0001 #ifndef CondCore_CondHDF5ESSource_h5_Group_h
0002 #define CondCore_CondHDF5ESSource_h5_Group_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     CondCore/CondHDF5ESSource
0006 // Class  :     Group
0007 //
0008 /**\class Group Group.h "Group.h"
0009 
0010  Description: [one line class summary]
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Christopher Jones
0018 //         Created:  Fri, 30 Jun 2023 14:37:18 GMT
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 #include <string>
0024 
0025 #include "hdf5.h"
0026 
0027 // user include files
0028 
0029 // forward declarations
0030 
0031 namespace cms::h5 {
0032   class File;
0033   class DataSet;
0034   class Attribute;
0035 
0036   class Group {
0037   public:
0038     explicit Group(hid_t, std::string const&);
0039     explicit Group(hid_t, const void* iRef);
0040 
0041     ~Group();
0042 
0043     Group(const Group&) = delete;             // stop default
0044     Group& operator=(const Group&) = delete;  // stop default
0045     Group(Group&&) = delete;                  // stop default
0046     Group& operator=(Group&&) = delete;       // stop default
0047 
0048     // ---------- const member functions ---------------------
0049     std::shared_ptr<Group> findGroup(std::string const& iName) const;
0050     std::shared_ptr<DataSet> findDataSet(std::string const& iName) const;
0051     std::shared_ptr<Attribute> findAttribute(std::string const& iName) const;
0052 
0053     std::shared_ptr<Group> derefGroup(hobj_ref_t iRef) const;
0054     std::shared_ptr<DataSet> derefDataSet(hobj_ref_t iRef) const;
0055 
0056     std::string name() const;
0057 
0058     std::size_t getNumObjs() const;
0059     std::string getObjnameByIdx(std::size_t) const;
0060     // ---------- static member functions --------------------
0061 
0062     // ---------- member functions ---------------------------
0063 
0064   private:
0065     // ---------- member data --------------------------------
0066 
0067     hid_t id_;
0068   };
0069 }  // namespace cms::h5
0070 #endif