diff --git a/src/include/PMusr.h b/src/include/PMusr.h index b709e733..e10547eb 100644 --- a/src/include/PMusr.h +++ b/src/include/PMusr.h @@ -873,7 +873,7 @@ class PRawRunData { virtual const PIntPair GetGoodDataBin(const UInt_t histoNo) { return fData.GetGoodDataBin(histoNo); } virtual const PIntVector GetRedGreenOffset() { return fRedGreenOffset; } virtual const Int_t GetNumberOfGoodFrames() { return fNumberOfGoodFrames; } - virtual const PDoubleVector GetDeadTimeParam() { return fDeadTimeParam; } + virtual const std::vector GetDeadTimeParam() { return fDeadTimeParam; } virtual const UInt_t GetNoOfHistos() { return fData.Size(); } virtual PRawRunDataSet* GetDataSet(const UInt_t idx, Bool_t wantHistoNo = true); virtual const PDoubleVector* GetDataBin(const UInt_t histoNo) { return fData.GetData(histoNo); } @@ -916,7 +916,7 @@ class PRawRunData { virtual void SetTimeResolution(const Double_t dval) { fTimeResolution = dval; } virtual void SetRedGreenOffset(PIntVector &ivec) { fRedGreenOffset = ivec; } virtual void SetNumberOfGoodFrames(Int_t ival) { fNumberOfGoodFrames = ival; } - virtual void SetDeadTimeParam(PDoubleVector dvec) { fDeadTimeParam = dvec; } + virtual void SetDeadTimeParam(std::vector dvec) { fDeadTimeParam = dvec; } virtual void SetDataSet(PRawRunDataSet &dataSet, UInt_t idx=-1) { fData.Set(dataSet, idx); } PNonMusrRawRunData fDataNonMusr; ///< keeps all ascii- or db-file info in case of nonMusr fit @@ -956,7 +956,7 @@ class PRawRunData { PDoubleVector fRingAnode; ///< LEM ring anode HVs (L,R[,T,B]) Double_t fTimeResolution{PMUSR_UNDEFINED}; ///< time resolution of the run in (ns) PIntVector fRedGreenOffset; ///< keeps the Red/Green offsets - PDoubleVector fDeadTimeParam; ///< dead time parameter vector needed for pulsed sources + std::vector fDeadTimeParam; ///< dead time parameter vector needed for pulsed sources Int_t fNumberOfGoodFrames{0}; ///< needed to correct dead times at pulsed sources PRawRunDataVector fData; ///< keeps the histos together with the histo related properties such as T0, first good bin, etc. diff --git a/src/include/PRunDataHandler.h b/src/include/PRunDataHandler.h index eaf5ad8d..a4170cb3 100644 --- a/src/include/PRunDataHandler.h +++ b/src/include/PRunDataHandler.h @@ -620,9 +620,20 @@ Bool_t PRunDataHandler::ReadNexusFileIdf1(T& nxs_file) runData.SetStopDate(date); } + // get/set deadtime relevant parameters + if (nxs_file->HasDataset("/run/instrument/detector/deadtimes")) { + std::vector dt; + dt = nxs_file->template GetDataset("/run/instrument/detector/deadtimes").GetData(); + runData.SetDeadTimeParam(dt); + } + if (nxs_file->HasDataset("/run/instrument/beam/frames_good")) { + ival = nxs_file->template GetDataset("/run/instrument/beam/frames_good").GetData()[0]; + runData.SetNumberOfGoodFrames(ival); + } + // data with its metadata - int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1}; if (nxs_file->HasDataset("/run/histogram_data_1/counts")) { + int t0_bin{-1}, fgb{-1}, lgb{-1}, noOfHistos{-1}, histoLength{-1}; auto count_ds = nxs_file->template GetDataset("/run/histogram_data_1/counts"); auto count = count_ds.GetData(); // get all necessary attributes