Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondCore_CondHDF5ESSource_h5_File_h
0002 #define CondCore_CondHDF5ESSource_h5_File_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     CondCore/CondHDF5ESSource
0006 // Class  :      File
0007 //
0008 /**\class  File  File.h " File.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:36:39 GMT
0019 //
0020 
0021 // system include files
0022 #include <string>
0023 #include <memory>
0024 
0025 #include "hdf5.h"
0026 
0027 // user include files
0028 
0029 // forward declarations
0030 
0031 namespace cms::h5 {
0032   class Group;
0033   class DataSet;
0034   class Attribute;
0035 
0036   class File {
0037   public:
0038     enum CtrOption { kReadOnly };
0039 
0040     File(std::string const& iName, CtrOption);
0041     ~File();
0042 
0043     File(const File&) = delete;             // stop default
0044     File& operator=(const File&) = delete;  // stop default
0045     File(File&&) = delete;                  // stop default
0046     File& operator=(File&&) = 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     // ---------- static member functions --------------------
0057 
0058     // ---------- member functions ---------------------------
0059 
0060   private:
0061     // ---------- member data --------------------------------
0062     hid_t id_;
0063   };
0064 }  // namespace cms::h5
0065 
0066 #endif