Merge branch 'root6' of https://git.psi.ch/nemu/musrfit into root6
This commit is contained in:
commit
88b3ab8a01
@ -1403,6 +1403,10 @@ Int_t main(Int_t argc, Char_t *argv[])
|
|||||||
fourier.resize(histo.size());
|
fourier.resize(histo.size());
|
||||||
for (UInt_t i=0; i<fourier.size(); i++) {
|
for (UInt_t i=0; i<fourier.size(); i++) {
|
||||||
fourier[i] = new PFourier(histo[i], unitTag, 0.0, 0.0, true, startupParam.fourierPower);
|
fourier[i] = new PFourier(histo[i], unitTag, 0.0, 0.0, true, startupParam.fourierPower);
|
||||||
|
if (fourier[i] == nullptr) {
|
||||||
|
std::cerr << ">> musrFT: **ERROR** couldn't invoke PFourier object" << std::endl;
|
||||||
|
return PMUSR_MSR_ALLOCATION_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fourier transform data
|
// Fourier transform data
|
||||||
@ -1426,7 +1430,7 @@ Int_t main(Int_t argc, Char_t *argv[])
|
|||||||
startupParam.fourierRange[1] = fourier[0]->GetMaxFreq();
|
startupParam.fourierRange[1] = fourier[0]->GetMaxFreq();
|
||||||
}
|
}
|
||||||
|
|
||||||
PFourierCanvas *fourierCanvas = nullptr;
|
std::unique_ptr<PFourierCanvas> fourierCanvas;
|
||||||
|
|
||||||
// if Fourier dumped if whished do it now
|
// if Fourier dumped if whished do it now
|
||||||
if (startupParam.dumpFln.Length() > 0) {
|
if (startupParam.dumpFln.Length() > 0) {
|
||||||
@ -1446,19 +1450,23 @@ Int_t main(Int_t argc, Char_t *argv[])
|
|||||||
TApplication app("App", &argc, argv);
|
TApplication app("App", &argc, argv);
|
||||||
|
|
||||||
if (startupHandler) {
|
if (startupHandler) {
|
||||||
fourierCanvas = new PFourierCanvas(fourier, dataSetTag, startupParam.title.Data(),
|
fourierCanvas = std::unique_ptr<PFourierCanvas>(new PFourierCanvas(fourier, dataSetTag, startupParam.title.Data(),
|
||||||
startupParam.showAverage, startupParam.showAveragePerDataSet,
|
startupParam.showAverage, startupParam.showAveragePerDataSet,
|
||||||
fourierPlotTag, startupParam.fourierRange, startupParam.initialPhase,
|
fourierPlotTag, startupParam.fourierRange, startupParam.initialPhase,
|
||||||
10, 10, 800, 800,
|
10, 10, 800, 800,
|
||||||
startupHandler->GetMarkerList(),
|
startupHandler->GetMarkerList(),
|
||||||
startupHandler->GetColorList(),
|
startupHandler->GetColorList(),
|
||||||
batch);
|
batch));
|
||||||
} else {
|
} else {
|
||||||
fourierCanvas = new PFourierCanvas(fourier, dataSetTag, startupParam.title.Data(),
|
fourierCanvas = std::unique_ptr<PFourierCanvas>(new PFourierCanvas(fourier, dataSetTag, startupParam.title.Data(),
|
||||||
startupParam.showAverage, startupParam.showAveragePerDataSet,
|
startupParam.showAverage, startupParam.showAveragePerDataSet,
|
||||||
fourierPlotTag, startupParam.fourierRange, startupParam.initialPhase,
|
fourierPlotTag, startupParam.fourierRange, startupParam.initialPhase,
|
||||||
10, 10, 800, 800,
|
10, 10, 800, 800,
|
||||||
batch);
|
batch));
|
||||||
|
}
|
||||||
|
if (fourierCanvas == nullptr) {
|
||||||
|
std::cerr << ">> musrFT: **ERROR** couldn't invoke PFourierCanvas object." << std::endl;
|
||||||
|
return PMUSR_MSR_ALLOCATION_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
fourierCanvas->UpdateFourierPad();
|
fourierCanvas->UpdateFourierPad();
|
||||||
@ -1471,7 +1479,7 @@ Int_t main(Int_t argc, Char_t *argv[])
|
|||||||
ok = false;
|
ok = false;
|
||||||
} else {
|
} else {
|
||||||
// connect signal/slot
|
// connect signal/slot
|
||||||
TQObject::Connect("TCanvas", "Closed()", "PFourierCanvas", fourierCanvas, "LastCanvasClosed()");
|
TQObject::Connect("TCanvas", "Closed()", "PFourierCanvas", fourierCanvas.get(), "LastCanvasClosed()");
|
||||||
|
|
||||||
fourierCanvas->SetTimeout(startupParam.timeout);
|
fourierCanvas->SetTimeout(startupParam.timeout);
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <TApplication.h>
|
#include <TApplication.h>
|
||||||
#include <TSAXParser.h>
|
#include <TSAXParser.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user