musrfit 1.10.0
PNeXus.cpp File Reference

Implementation of the PNeXus class - NeXus HDF4/HDF5 file reader and writer. More...

#include <iostream>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <cstring>
#include <cmath>
#include <chrono>
#include <ctime>
#include <iomanip>
#include "Minuit2/MnStrategy.h"
#include "Minuit2/MnMinimize.h"
#include "Minuit2/FunctionMinimum.h"
#include "PNeXus.h"
Include dependency graph for PNeXus.cpp:

Go to the source code of this file.

Detailed Description

Implementation of the PNeXus class - NeXus HDF4/HDF5 file reader and writer.

This file contains the implementation of the PNeXus class for reading and writing ISIS muon NeXus HDF5 files. It provides case-insensitive path lookup functionality using the HDF4 C / HDF5 C++ API.

The implementation includes:

Read Functionality:

  • String utilities for case-insensitive comparison
  • Path parsing for HDF4 / HDF5 hierarchical paths
  • Recursive path traversal with case-insensitive matching
  • Attribute, group, and dataset lookup functions
  • Support for IDF version 1 and 2

Write Functionality:

  • Group hierarchy creation
  • Dataset writing for int, float, and string types
  • Attribute preservation
  • Multi-dimensional array support
  • Type-safe operations using PNXdata template class

Error Handling:

  • Comprehensive error handling with descriptive exceptions
  • Validation of data consistency
  • HDF4 error propagation / HDF5 exception propagation
Author
Andreas Suter
Date
2007-2026
Version
1.0
See also
nxH4::PNeXus
nxH4::PNXdata
nxH5::PNeXus
nxH5::PNXdata

Definition in file PNeXus.cpp.