first test to read hdf4/hdf5 directly.
This commit is contained in:
@@ -2140,9 +2140,15 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Will read nexus file " << fRunPathName.Data() << " ...";
|
||||
|
||||
nxs::HDFType type = nxs::checkHDFType(fRunPathName.Data());
|
||||
|
||||
// check for type errors, missing enabled HDF4
|
||||
switch (type) {
|
||||
case nxs::HDFType::HDF4:
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
|
||||
#ifndef HAVE_HDF4
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): **ERROR**, HDF4 is not enabled." << std::endl;
|
||||
return false;
|
||||
#endif
|
||||
break;
|
||||
case nxs::HDFType::HDF5:
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
|
||||
@@ -2152,6 +2158,14 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (type == nxs::HDFType::HDF4) {
|
||||
#ifdef HAVE_HDF4
|
||||
std::unique_ptr<nxH4::PNeXus> nxs_file = std::make_unique<nxH4::PNeXus>(fRunPathName.Data());
|
||||
#endif
|
||||
} else { // HDF5
|
||||
std::unique_ptr<nxH5::PNeXus> nxs_file = std::make_unique<nxH5::PNeXus>(fRunPathName.Data());
|
||||
}
|
||||
|
||||
/* //as35
|
||||
PDoubleVector histoData;
|
||||
PRawRunData runData;
|
||||
|
||||
Reference in New Issue
Block a user