Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef CondCore_CondHDF5ESSource_DataSet_h
0002 #define CondCore_CondHDF5ESSource_DataSet_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     CondCore/CondHDF5ESSource
0006 // Class  :     DataSet
0007 //
0008 /**\class DataSet DataSet.h "DataSet.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:25 GMT
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 #include <string>
0024 #include <vector>
0025 
0026 #include "hdf5.h"
0027 
0028 // user include files
0029 #include "IOVSyncValue.h"
0030 
0031 // forward declarations
0032 
0033 namespace cms::h5 {
0034   class File;
0035   class Group;
0036   class Attribute;
0037 
0038   class DataSet {
0039   public:
0040     DataSet(hid_t iParentID, std::string const& iName);
0041     DataSet(hid_t iParentID, const void* iRef);
0042     ~DataSet();
0043 
0044     DataSet(const DataSet&) = delete;             // stop default
0045     DataSet& operator=(const DataSet&) = delete;  // stop default
0046     DataSet(DataSet&&) = delete;                  // stop default
0047     DataSet& operator=(DataSet&&) = delete;       // stop default
0048 
0049     // ---------- const member functions ---------------------
0050     std::shared_ptr<Attribute> findAttribute(std::string const& iName) const;
0051 
0052     std::vector<hobj_ref_t> readRefs() const;
0053     std::vector<char> readBytes() const;
0054     std::vector<cond::hdf5::IOVSyncValue> readSyncValues() const;
0055 
0056     std::size_t storageSize() const;
0057     std::size_t memorySize() const;
0058     uint64_t fileOffset() const;
0059     uint32_t layout() const;
0060 
0061     // ---------- static member functions --------------------
0062 
0063     // ---------- member functions ---------------------------
0064 
0065   private:
0066     std::size_t size() const;
0067 
0068     // ---------- member data --------------------------------
0069     hid_t id_;
0070   };
0071 
0072 }  // namespace cms::h5
0073 #endif