read deadtime parameters for IDF V1.
This commit is contained in:
@@ -873,7 +873,7 @@ class PRawRunData {
|
|||||||
virtual const PIntPair GetGoodDataBin(const UInt_t histoNo) { return fData.GetGoodDataBin(histoNo); }
|
virtual const PIntPair GetGoodDataBin(const UInt_t histoNo) { return fData.GetGoodDataBin(histoNo); }
|
||||||
virtual const PIntVector GetRedGreenOffset() { return fRedGreenOffset; }
|
virtual const PIntVector GetRedGreenOffset() { return fRedGreenOffset; }
|
||||||
virtual const Int_t GetNumberOfGoodFrames() { return fNumberOfGoodFrames; }
|
virtual const Int_t GetNumberOfGoodFrames() { return fNumberOfGoodFrames; }
|
||||||
virtual const PDoubleVector GetDeadTimeParam() { return fDeadTimeParam; }
|
virtual const std::vector<float> GetDeadTimeParam() { return fDeadTimeParam; }
|
||||||
virtual const UInt_t GetNoOfHistos() { return fData.Size(); }
|
virtual const UInt_t GetNoOfHistos() { return fData.Size(); }
|
||||||
virtual PRawRunDataSet* GetDataSet(const UInt_t idx, Bool_t wantHistoNo = true);
|
virtual PRawRunDataSet* GetDataSet(const UInt_t idx, Bool_t wantHistoNo = true);
|
||||||
virtual const PDoubleVector* GetDataBin(const UInt_t histoNo) { return fData.GetData(histoNo); }
|
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 SetTimeResolution(const Double_t dval) { fTimeResolution = dval; }
|
||||||
virtual void SetRedGreenOffset(PIntVector &ivec) { fRedGreenOffset = ivec; }
|
virtual void SetRedGreenOffset(PIntVector &ivec) { fRedGreenOffset = ivec; }
|
||||||
virtual void SetNumberOfGoodFrames(Int_t ival) { fNumberOfGoodFrames = ival; }
|
virtual void SetNumberOfGoodFrames(Int_t ival) { fNumberOfGoodFrames = ival; }
|
||||||
virtual void SetDeadTimeParam(PDoubleVector dvec) { fDeadTimeParam = dvec; }
|
virtual void SetDeadTimeParam(std::vector<float> dvec) { fDeadTimeParam = dvec; }
|
||||||
virtual void SetDataSet(PRawRunDataSet &dataSet, UInt_t idx=-1) { fData.Set(dataSet, idx); }
|
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
|
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])
|
PDoubleVector fRingAnode; ///< LEM ring anode HVs (L,R[,T,B])
|
||||||
Double_t fTimeResolution{PMUSR_UNDEFINED}; ///< time resolution of the run in (ns)
|
Double_t fTimeResolution{PMUSR_UNDEFINED}; ///< time resolution of the run in (ns)
|
||||||
PIntVector fRedGreenOffset; ///< keeps the Red/Green offsets
|
PIntVector fRedGreenOffset; ///< keeps the Red/Green offsets
|
||||||
PDoubleVector fDeadTimeParam; ///< dead time parameter vector needed for pulsed sources
|
std::vector<float> fDeadTimeParam; ///< dead time parameter vector needed for pulsed sources
|
||||||
Int_t fNumberOfGoodFrames{0}; ///< needed to correct dead times at 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.
|
PRawRunDataVector fData; ///< keeps the histos together with the histo related properties such as T0, first good bin, etc.
|
||||||
|
|||||||
@@ -620,9 +620,20 @@ Bool_t PRunDataHandler::ReadNexusFileIdf1(T& nxs_file)
|
|||||||
runData.SetStopDate(date);
|
runData.SetStopDate(date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get/set deadtime relevant parameters
|
||||||
|
if (nxs_file->HasDataset("/run/instrument/detector/deadtimes")) {
|
||||||
|
std::vector<float> dt;
|
||||||
|
dt = nxs_file->template GetDataset<float>("/run/instrument/detector/deadtimes").GetData();
|
||||||
|
runData.SetDeadTimeParam(dt);
|
||||||
|
}
|
||||||
|
if (nxs_file->HasDataset("/run/instrument/beam/frames_good")) {
|
||||||
|
ival = nxs_file->template GetDataset<float>("/run/instrument/beam/frames_good").GetData()[0];
|
||||||
|
runData.SetNumberOfGoodFrames(ival);
|
||||||
|
}
|
||||||
|
|
||||||
// data with its metadata
|
// 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")) {
|
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<int>("/run/histogram_data_1/counts");
|
auto count_ds = nxs_file->template GetDataset<int>("/run/histogram_data_1/counts");
|
||||||
auto count = count_ds.GetData();
|
auto count = count_ds.GetData();
|
||||||
// get all necessary attributes
|
// get all necessary attributes
|
||||||
|
|||||||
Reference in New Issue
Block a user