Skip to content

how to read pytable data in H5 File using HighFive #1014

Answered by algoqt
algoqt asked this question in Questions
Discussion options

You must be logged in to vote

problem solved

#include <vector>
#include <highfive/highfive.hpp>
#include <format>

struct Particle {
    uint16_t ADCcount; // Unsigned short integer
    uint8_t TDCcount;  // unsigned byte
    double energy;     // double (double-precision)

    int32_t grid_i;    // 32-bit integer
    int32_t grid_j;    // 32-bit integer

    int64_t idnumber;  // Signed 64-bit integer
    char   name[16];     // 16-character String
    float pressure;    // float (single-precision)
};


int main() {

    HighFive::CompoundType mtype = HighFive::CompoundType{
           {"ADCcount", HighFive::create_datatype<uint16_t>()},
           {"TDCcount", HighFive::create_datatype<uint8_t>()},
           {"ener…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@1uc
Comment options

1uc Jun 2, 2024
Maintainer

@algoqt
Comment options

Answer selected by algoqt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants