Skip to content
Snippets Groups Projects
Commit 52afd53b authored by Munken's avatar Munken
Browse files

Typedef return type from TSpectrum

Fixes #18
parent 194f6642
No related branches found
No related tags found
1 merge request!19Calibration fix
......@@ -8,6 +8,13 @@ using namespace std;
#include "TSpectrum.h"
#include "TH1.h"
namespace {
#if ROOT_VERSION_CODE > ROOT_VERSION(6,0,0)
typedef Double_t* TSPECTRUM_RETURN;
#else
typedef Float_t* TSPECTRUM_RETURN;
#endif
}
NPL::SiliconCalibrator::SiliconCalibrator(){
}
......@@ -213,7 +220,7 @@ TGraphErrors* NPL::SiliconCalibrator::FitSpectrum(TH1* histo, double rmin, doubl
TSpectrum* sp = new TSpectrum(4,1);
// nfound = sp->Search(histo,3,"",0.25);
Int_t nfound = sp->Search(histo,3,"",0.5);
Float_t* xpeaks =(Float_t*) sp->GetPositionX();
TSPECTRUM_RETURN xpeaks = sp->GetPositionX();
// order list of peaks
sort(xpeaks, xpeaks+nfound);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment