5 #ifndef _AtHDFUNPACKER_H_
6 #define _AtHDFUNPACKER_H_
13 #include <H5Dpublic.h>
14 #include <H5Ipublic.h>
15 #include <H5Lpublic.h>
16 #include <H5Ppublic.h>
17 #include <H5Spublic.h>
30 class TMemberInspector;
56 virtual std::size_t
open(
char const *file);
60 virtual std::size_t
n_pads(std::string i_raw_event);
61 virtual std::vector<int16_t>
pad_raw_data(std::size_t i_pad);
63 std::tuple<hid_t, hsize_t>
open_group(hid_t fileId,
char const *group);
64 std::tuple<hid_t, std::vector<hsize_t>>
open_dataset(hid_t locId,
char const *dataset);
70 Float_t
getBaseline(
const std::vector<int16_t> &data);
73 void read_slab(hid_t dataset, hsize_t *counts, hsize_t *offsets, hsize_t *dims_out, T *data)
75 hid_t dataspace = H5Dget_space(dataset);
76 H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offsets,
nullptr, counts,
nullptr);
77 hid_t memspace = H5Screate_simple(2, dims_out,
nullptr);
78 H5Dread(dataset, H5T_NATIVE_INT16, memspace, dataspace, H5P_DEFAULT, data);
89 void setEventIDAndTimestamps();
91 void setDimensions(
AtPad *pad);
92 void setAdc(
AtPad *pad,
const std::vector<int16_t> &data);
95 std::vector<uint64_t> get_header(std::string headerName);
96 std::size_t datasets();
97 static herr_t file_info(hid_t loc_id,
const char *name,
const H5L_info_t *linfo,
void *opdata);
99 std::string get_event_name(std::size_t idx);