DataSet

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
#ifndef CondCore_CondHDF5ESSource_DataSet_h
#define CondCore_CondHDF5ESSource_DataSet_h
// -*- C++ -*-
//
// Package:     CondCore/CondHDF5ESSource
// Class  :     DataSet
//
/**\class DataSet DataSet.h "DataSet.h"

 Description: [one line class summary]

 Usage:
    <usage>

*/
//
// Original Author:  Christopher Jones
//         Created:  Fri, 30 Jun 2023 14:37:25 GMT
//

// system include files
#include <memory>
#include <string>
#include <vector>

#include "hdf5.h"

// user include files
#include "IOVSyncValue.h"

// forward declarations

namespace cms::h5 {
  class File;
  class Group;
  class Attribute;

  class DataSet {
  public:
    DataSet(hid_t iParentID, std::string const& iName);
    DataSet(hid_t iParentID, const void* iRef);
    ~DataSet();

    DataSet(const DataSet&) = delete;             // stop default
    DataSet& operator=(const DataSet&) = delete;  // stop default
    DataSet(DataSet&&) = delete;                  // stop default
    DataSet& operator=(DataSet&&) = delete;       // stop default

    // ---------- const member functions ---------------------
    std::shared_ptr<Attribute> findAttribute(std::string const& iName) const;

    std::vector<hobj_ref_t> readRefs() const;
    std::vector<char> readBytes() const;
    std::vector<cond::hdf5::IOVSyncValue> readSyncValues() const;

    std::size_t storageSize() const;
    std::size_t memorySize() const;
    uint64_t fileOffset() const;
    uint32_t layout() const;

    // ---------- static member functions --------------------

    // ---------- member functions ---------------------------

  private:
    std::size_t size() const;

    // ---------- member data --------------------------------
    hid_t id_;
  };

}  // namespace cms::h5
#endif