diff --git a/src/classes/PRunDataHandler.cpp b/src/classes/PRunDataHandler.cpp index f2c2559d..df820d00 100644 --- a/src/classes/PRunDataHandler.cpp +++ b/src/classes/PRunDataHandler.cpp @@ -5165,22 +5165,24 @@ Bool_t PRunDataHandler::WriteNexusFile(TString format, TString fln) size = dataCount; } nxs->AddDataset("/raw_data_1/instrument/detector_1/counts", data, {(long unsigned int)noHisto, size}, H5::PredType::NATIVE_INT32); - nxs->AddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "axis", std::string("spectrum_index,time_bin")); + nxs->AddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "axes", std::string("spectrum_index,time_bin")); nxs->AddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "long_name", std::string("positon counts")); nxs->AddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "signal", 1); // t0_bin attributes std::vector t0_bin; for (unsigned int i=0; irebin)); -std::cerr << std::endl; -for (unsigned int i=0; iAddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "t0_bin", {t0_bin}); nxs->AddDatasetAttribute("/raw_data_1/instrument/detector_1/counts", "units", std::string("counts")); // set raw_data_1/detector info nxs->AddGroupAttribute("/raw_data_1/detector_1", "NX_class", std::string("NXdata")); + + // set detector/counts + nxs->AddDataset("/raw_data_1/detector_1/counts", data, {(long unsigned int)noHisto, size}, H5::PredType::NATIVE_INT32); + nxs->AddDatasetAttribute("/raw_data_1/detector_1/counts", "axes", std::string("spectrum_index,time_bin")); + nxs->AddDatasetAttribute("/raw_data_1/detector_1/counts", "long_name", std::string("positon counts")); + nxs->AddDatasetAttribute("/raw_data_1/detector_1/counts", "signal", 1); } int result = nxs->WriteNexusFile(fln.Data(), fAny2ManyInfo->idf);