stub for new NeXus file handling. Not much is working yet.
This commit is contained in:
@@ -59,6 +59,10 @@
|
||||
#include "MuSR_td_PSI_bin.h"
|
||||
#include "mud.h"
|
||||
|
||||
#ifdef PNEXUS_ENABLED
|
||||
#include "PNeXus.h"
|
||||
#endif
|
||||
|
||||
#include "PRunDataHandler.h"
|
||||
|
||||
#define PRH_MUSR_ROOT 0
|
||||
@@ -2135,13 +2139,27 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
#ifdef PNEXUS_ENABLED
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Will read nexus file " << fRunPathName.Data() << " ...";
|
||||
|
||||
nxs::HDFType type = nxs::checkHDFType(fRunPathName.Data());
|
||||
switch (type) {
|
||||
case nxs::HDFType::HDF4:
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF4 file." << std::endl;
|
||||
break;
|
||||
case nxs::HDFType::HDF5:
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): HDF5 file." << std::endl;
|
||||
break;
|
||||
case nxs::HDFType::Unknown:
|
||||
std::cerr << std::endl << ">> PRunDataHandler::ReadNexusFile(): Not a valid NeXus file." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* //as35
|
||||
PDoubleVector histoData;
|
||||
PRawRunData runData;
|
||||
PRawRunDataSet dataSet;
|
||||
TString str;
|
||||
std::string sstr;
|
||||
Double_t dval;
|
||||
bool ok;
|
||||
bool ok;
|
||||
|
||||
std::unique_ptr<PNeXus> nxs_file = std::make_unique<PNeXus>(fRunPathName.Data());
|
||||
if (!nxs_file->IsValid()) {
|
||||
@@ -2475,6 +2493,7 @@ Bool_t PRunDataHandler::ReadNexusFile()
|
||||
} else {
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): IDF version " << nxs_file->GetIdfVersion() << ", not implemented." << std::endl;
|
||||
}
|
||||
*/ //as35
|
||||
#else
|
||||
std::cout << std::endl << ">> PRunDataHandler::ReadNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||
#endif
|
||||
@@ -4999,6 +5018,7 @@ Bool_t PRunDataHandler::WriteRootFile(TString fln)
|
||||
Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
||||
{
|
||||
#ifdef PNEXUS_ENABLED
|
||||
/* //as35
|
||||
Bool_t ok = false;
|
||||
fln = GenerateOutputFileName(fln, ".nxs", ok);
|
||||
if (!ok)
|
||||
@@ -5308,6 +5328,7 @@ Bool_t PRunDataHandler::WriteNexusFile(TString fln)
|
||||
|
||||
// write file
|
||||
nxs->WriteFile(fln, fileType, fAny2ManyInfo->idf);
|
||||
*/ //as35
|
||||
#else
|
||||
std::cout << std::endl << ">> PRunDataHandler::WriteNexusFile(): Sorry, not enabled at configuration level, i.e. --enable-NeXus when executing configure" << std::endl << std::endl;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user